When one of the item used in the cacheMap, first update the item used number.
key of the cacheMap.
Based on percent number, remove items from cacheMap.
Load object from either cacheMap or file.
1. generate file name; 2. key in the cacheMap.
Object which type is T
Save 'value' to file.
generate file name.
the Object (which type is T) you want to store.
Define the size of cacheMap.
It's an Int number which defines size of the cacheMap.
If the cacheMap is full, based on the percent defined here to remove proper percent of items from cacheMap.
Percent of items need to remove.
Set serializer and unserializer to covert value to proper type.
serializer, which convert any type to string and put it to output stream.
unserializer, which get string from input stream and convert to any type.