1. A method for intelligently caching applications and data on a gateway, comprising the steps of: calculating a cache benefit index for a set of files, said cache benefit index indicating a total benefit for caching said set of files; determining whether to cache said set of files on a local file system based on said cache benefit index; caching said set of files on said local file system; and updating a set of tables in a gateway database based on said caching.