import { copyProps } from './utils' ; /**
 * Handles storage and accessing of values
 *
 * In this case, we use it to store compiled template functions
 * Indexed by their `name` or `filename`
 */ class Cacher < T > { constructor ( private cache ) { } define ( key , val ) { this . cache [ key ] = val ; } get ( key ) { return this . cache [ key ] ; } remove ( key ) { delete this . cache [ key ] ; } reset ( ) { this . cache = { } ; } load ( cacheObj ) { copyProps ( this . cache , cacheObj ) ; } } export { Cacher } ;