1. A method for automatically changing the size of a cache, comprising: removing old entries in said cache using an eviction policy; inserting new entries in said cache; maintaining information about regenerated entries and replaced entries; and resizing said cache based on a function of said information about regenerated entries and replaced entries.