Giter Site home page Giter Site logo

promise-cache-controller's Introduction

Promise Cache Controller

开发中 2020-01-09

扩展了Promise返回的前端缓存控制器(支持同步访问操作),目前支持基于LocalStorage,SessionStorage,RAM作为底层存储组件

主要用于配合Axios实现可配置的自动前端缓存,用法见于我fork的axios 分支: [email protected]:MissionLee/axios.git

功能/特性

  • 注意:独立使用的时候除了RAMCacheController,其他没有太大价值,作者开发这个组件主要为将其作为Axios的一个Interceptor,通过简单配置,可以进行自动数据缓存
  • 基本实现了Storage (),部分情况的 key(index) , 还有下标存取未实现
  • 提供Promise访问存储功能:用于配合如 axios 这样的基于Promise的前端ajax组件,实现缓存和请求返回值相同(自动缓存,而无需额外代码处理)

promise-cache-controller's People

Contributors

missionlee avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.