pyndn.in_memory_storage package¶
Submodules¶
pyndn.in_memory_storage.in_memory_storage_retaining module¶
This module defines the InMemoryStorageRetaining class, which provides an application cache with in-memory storage, of which no eviction policy will be employed. Entries will only be evicted by explicit application control. Note: In ndn-cxx, this class is called InMemoryStoragePersistent, but “persistent” misleadingly sounds like persistent on-disk storage.
-
class
pyndn.in_memory_storage.in_memory_storage_retaining.InMemoryStorageRetaining[source]¶ Bases:
objectCreate an empty InMemoryStorageRetaining.
-
find(nameOrInterest)[source]¶ Find the best match Data for a Name or an Interest.
Parameters: nameOrInterest (Name or Interest) – The Name or the Interest with the Name of the Data packet to find. Returns: The best match if any, otherwise None. You should not modify the returned object. If you need to modify it then you must make a copy. Return type: Data
-
insert(data)[source]¶ Insert a Data packet. If a Data packet with the same name, including the implicit digest, already exists, replace it.
Parameters: data (Data) – The packet to insert, which is copied.
-