ndn-js: fix MemoryContentCache.storePendingInterest

This commit is contained in:
Junxiao Shi
2019-03-22 11:02:39 -04:00
parent eff3febc9e
commit e87748d389
2 changed files with 2 additions and 3 deletions

View File

@@ -2,7 +2,6 @@ import { Data } from "./data";
import { Face, ForwardingFlags, InterestFilter, OnInterestCallback } from "./face";
import { Interest } from "./interest";
import { Name } from "./name";
import { Transport } from "./transport";
export class MemoryContentCache {
constructor(face: Face, cleanupIntervalMilliseconds?: number);
@@ -15,6 +14,6 @@ export class MemoryContentCache {
onDataNotFound?: OnInterestCallback, flags?: ForwardingFlags): void;
setInterestFilter(filter: InterestFilter|Name, onDataNotFound?: OnInterestCallback): void;
setMinimumCacheLifetime(minimumCacheLifetime: number): void;
storePendingInterest(interest: Interest, transport: Transport): void;
storePendingInterest(interest: Interest, face: Face): void;
unregisterAll(): void;
}

View File

@@ -12,4 +12,4 @@ cache.registerPrefix(new ndn.Name("/A"),
cache.getStorePendingInterest());
cache.setInterestFilter(new ndn.Name("/A"), cache.getStorePendingInterest());
cache.setMinimumCacheLifetime(5000);
cache.storePendingInterest(new ndn.Interest(), new ndn.UnixTransport());
cache.storePendingInterest(new ndn.Interest(), face);