UNPKG

ng-imgcache

Version:

Angular 2+ module to cache images for offline use.

23 lines (22 loc) 637 B
export interface ImgCacheConfig { debug?: boolean; localCacheFolder?: string; useDataURI?: boolean; chromeQuota?: number; usePersistentCache?: boolean; cacheClearSize?: number; headers?: {}; withCredentials?: boolean; skipURIencoding?: boolean; cordovaFilesystemRoot?: string; timeout?: number; } export declare class ImgCacheService { private promise; init(config?: ImgCacheConfig): Promise<{}>; fetchFromCache(url: string): Promise<string>; clearCache(): Promise<null>; private checkInitialised(); private cacheIfNecessary(url); private replaceWithCached(url); }