Task #1940
Updated by Yingdi Yu about 10 years ago
The task is to provide implement a NDN data packet cache at the application level cache. Such a cache is desired because: 1) Although nfd It has content store as cache, four user interfaces: insert(const &Data), erase(const &Name), find(const &Name) and size(). Ultimately, the application cache is at network level. Applications is not allowed to change the content in content store. 2) Content store does not provide a reliable storage will support four replacement policies: persistent, FIFO, LRU, and LFU. The capacity of data packets. Therefore application still have to keep a copy of data in case the copy in content store is ejected due cache will change dynamically according to the cache policy. workload. The default capacity of the application cache provides "persistent" storage of is 10 data packet in memory, and also allows application to explicitly control (insert/erase) packets. It can be specified by the content in user during construction. Depending on the cache. An ideal use case of replacement policy the application cache is user specifies, the user might need to put provide a maximum capacity for the application cache at the network entrance of application. As during construction. Right now, a result, any incoming interest will be matched against content in the cache first. The interest will be handled explicitly by the application prototype version is provided. It only if there is no matched data packet in the cache. The cache should support four methods: class ApplicationCache { ... void insert(const Data&); void erase(const Name&); shared_ptr<const Data> find(const Interest&); size_t size(); ... } The cache can be managed supports persistent replacement policy with several strategies. The first strategy is **persistent**, with which inserted data packet unlimited maximum capacity. Later on, a completed version will never be removed unless it provided. P.S. The base framework is explicitly erased. As a result, the cache size will increase according to the content stored inside. Another category of strategies impose a fixed cache size which can be customized. When the cache reaches its limit, some existing cache entries may be ejected according to the policy of each strategy. adopted from ContentStore.