A caching system includes a caching profile that records a file identifier
and an entry time for each file that enters the caching system, and a
predictive modeling engine that analyzes the profile to determine metrics
for members of a set of caching algorithms. The metrics may be measures
of clustering or scattering of the file identities entering the caching
system. The algorithm with the most favorable metric is selected as the
preferred caching algorithm, and the file is processed according to the
preferred algorithm. In one embodiment of the invention, the set of
caching algorithms includes a most-used caching algorithm, a least-used
caching algorithm, a most-recently-used caching algorithm, and a
least-recently-used caching algorithm.