Skip to content

jeremycastelli/capacitor-image-cache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Image Cache Core

npm npm Build Status

npm i capacitor-image-cache

import { ImageCache } from 'capacitor-image-cache';

const cache = new ImageCache();

const { value } = await cache.get({src:"someSrc"}) // checks if the image is in cache and returns the image if not download, store then return

const { value } = await cache.clear() // Clear entire cache returns a boolean

const { value } = await cache.clearItem({src:"someSrc"}) // Clear item cache returns a boolean

const { value } = await cache.hasItem({src:"someSrc"}) // check if cache has item returns a boolean

Cached Image

npm npm Build Status

Cached Image

Install

Capacitor Image Cache is require for this package

  • npm i capacitor-image-cache st-cached-image

Usage

<st-cached-image src="https://i.annihil.us/u/prod/marvel/i/mg/e/e0/537bafa34baa9.jpg"></st-cached-image>

If using with ionic

import 'st-cached-image/dist/cached-image';

Update the following file since ionic ignores the file

youAppDir/node_modules/@ionic/app-scripts/config/copy.config.js

copyStCachedImage: {
    src: ['{{ROOT}}/node_modules/st-cached-image/dist/cached-image**/*'],
    dest: '{{BUILD}}'
  }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 53.5%
  • Swift 22.8%
  • TypeScript 13.5%
  • Objective-C 3.2%
  • Ruby 3.1%
  • JavaScript 2.0%
  • Other 1.9%