UNPKG

@ima/core

Version:

IMA.js framework for isomorphic javascript application

21 lines (20 loc) 682 B
import { CacheEntry } from './CacheEntry'; /** * Factory for creating instances of {@link CacheEntry}. */ export class CacheFactory { static get $dependencies() { return []; } /** * Create a new instance of {@link CacheEntry} with value and ttl. * * @param value The cache entry value. * @param ttl Cache entry time to live in milliseconds. The * entry will expire after the specified amount of milliseconds. * @param created Cache entry created time in milliseconds. * @return The created cache entry. */ createCacheEntry(value, ttl) { return new CacheEntry(value, ttl); } } //# sourceMappingURL=CacheFactory.js.map