A data caching method and a computer-readable medium storing a program
executing the method used in a cache system where a data replacing
parameter is used for a data replacement rule, are provided to assist
determining whether a user data has to be replaced or not. The data
caching method and the program rely on the cache system to determine
whether to replace the user data when the resource consumed in fetching
the user data is lower than a predetermined level. However, when the
resource consumed in fetching the user data is higher or equal to the
predetermined level, the value of the data replacing parameter mentioned
above is replaced within a predetermined period, such that the user data
could be maintained in the cache system.