README
缓存的过期策略
- 设置读取次数 2.设置过期时间
import {store,cache} from 'shield-store'
cache.set('key1','val1',{
time:60, //以秒为单位,不设置则不采取过期时间策略
read:10 //以次为单位,不设置则不采取次数策略
})
restful http base
<script type="module">
import shieldStore from 'https://cdn.skypack.dev/shield-store';
</script>
import {store,cache} from 'shield-store'
cache.set('key1','val1',{
time:60, //以秒为单位,不设置则不采取过期时间策略
read:10 //以次为单位,不设置则不采取次数策略
})