A method and system for file-system based caching can be used to improve
efficiency and security at network sites. In one set of embodiments, the
delivery of content and storing content component(s) formed during
generation of the content may be performed by different software
components. Content that changes at a relatively high frequency or is
likely to be regenerated between requests may not have some or all of its
corresponding files cached. Additionally, extra white space may be
removed before storing to reduce the file size. File mapping may be
performed to ensure that a directory within the cache will have an
optimal number of files. Security at the network site may be increased by
using an internally generated filename that is not used or seen by the
client computer. Many variations may be used is achieving any one or more
of the advantages described herein.