Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 2x 2x 1x | import { IAgingCacheDeleteStrategy } from './IAgingCacheWriteStrategy';
import { IAgingCacheWrite } from './IAgingCache';
import { AgingCacheWriteStrategy } from './AgingCacheWriteStrategy';
/**
* Strategy to overwrite regardless of the higher level value
*/
export class OverwriteAlwaysDeleteStrategy<TKey, TValue>
extends AgingCacheWriteStrategy<TKey, TValue>
implements IAgingCacheDeleteStrategy<TKey, TValue>
{
delete(key: TKey, _force: boolean): Promise<IAgingCacheWrite<TValue>> {
return this.executeDelete(key);
}
evict(key: TKey, evictAtLevel?: number, _force?: boolean): Promise<IAgingCacheWrite<TValue>> {
return this.executeDelete(key, evictAtLevel);
}
}
|