cachesim
A highly scalable cache simulator
cachesim provides a highly scalable skeleton of cache simulator. One can use this tool not only to simulate a conventional cache behavior but also introduce his own type of cache and even other level of storage in the storage hierarchy, which will introduce benefits into storage and memory research.
The basic usage is like:
use ;
To introduce a new type of cache, you need not to modify the source code. For example, if you want to introduce an 'Oracle Cache', firstly you could create a file 'oracle_cache.rs' or a module 'oracle_cache/mod.rs' under your own project directory. Then, define a struct representing the cache:
Then, implement the GeneralCacheBehavior for your new cache type:
use crate;
You can implement any other method for the cache.
Then, use your own cache in your project:
use ;
// Import your own cache.
use OracleCache;
By this way you could even introduce a hierarchical storage architecture by define and implement several struct that are well organized.