Task #3590
Updated by Anonymous over 8 years ago
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 Right now the MemoryContentCache constructor just takes the Face object. We should add a prefix or interestFilter parameter (like in Face.setInterestFilter) plus setInterestFilter). Also, the constructor should take the optional onDataNotFound callback (same as (which now is supplied to MemoryContentCache.registerPrefix). Therefore, the application calls Face.registerPrefix, then supplies the face and prefix to the MemoryContentCache constructor, then calls MemoryContentCache.setInterestFilter. constructor. 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.