Task #3590
closedMemoryContentCache: Support setInterestFilter
0%
Description
The Face API has been updated to support setInterestFilter, separate from registerPrefix. MemoryContentCache should support setting an interest filter also. This allows having multiple MemoryContentCache objects to hold Data packets under different namespaces (without needing to register prefix with the forwarder for each namespace.)
Proposal: Add a setInterestFilter method which takes a prefix or interestFilter (like in Face.setInterestFilter) plus the optional onDataNotFound callback (same as MemoryContentCache.registerPrefix). Therefore, the application calls Face.registerPrefix, then supplies the face to the MemoryContentCache constructor, then calls MemoryContentCache.setInterestFilter. It is not necessary to call MemoryContentCache.registerPrefix.
Note: When MemoryContentCache.onInterest doesn't find the data packet, it calls the onDataNotFound callback based on the supplied prefix. It is possible that there are multiple InterestFilters for the same prefix, but for now we don't distinguish these.