Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vuex-cache

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuex-cache - npm Package Versions

2

3.5.0

Diff

Changelog

Source

3.5.0

  • Upgrade devDependencies.

  • Add method to debug the cache object.

    Thanks to @rah-emil for PR #57.

vitorluizc
published 3.4.0 •

Changelog

Source

3.4.0

  • Upgrade devDependencies.

  • Allow clear to delete all cached actions with same name.

    Thanks to @lukasbesch for PR #51.

vitorluizc
published 3.3.0 •

Changelog

Source

3.3.0

  • Upgrade devDependencies.
  • Rename dist/vuex-cache.esm.js to dist/vuex-cache.es.js because of bili update.
vitorluizc
published 3.2.0 •

Changelog

Source

3.2.0

  • Upgrade devDependencies.
vitorluizc
published 3.1.1 •

Changelog

Source

3.1.1

  • Fixed mapCacheActions apply wrong context to dispatch method.

    Thanks to @kierans for PR #44 that fixed issue #43 reported by himself.

  • Export the StoreCache interface in type declarations.

    Thanks to @kierans for PR #42 that fixed issue #41 reported by himself.

vitorluizc
published 3.1.0 •

Changelog

Source

3.1.0

  • Add mapCacheAction function helper to call actions with cache on components.

    import { mapCachedActions } from 'vuex-cache';
    
    export default {
      name: 'Users',
      async mounted() {
        this.GET_USER();
        this.FETCH_REPOSITORY(219, {
          timeout: 30000
        });
      }
      methods: {
        ...mapCachedActions(['FETCH_REPOSITORY']),
        ...mapCachedActions('user', ['GET_USER'])
      }
    }
    

    Thanks to @cwilby for PR #37.

vitorluizc
published 3.0.0 •

Changelog

Source

3.0.0

  • Breaking Change: Module exports a factory to create plugin instead of the plugin itself.

    import Vue from 'vue'
    import Vuex, { Store } from 'vuex'
    import createCache from 'vuex-cache'
    
    Vue.use(Vuex)
    
    const store = new Store({
      plugins: [createCache()],
      ...
    })
    
  • Breaking Change: store.cache.has() returns false for expired actions.

    const store = new Store({
      plugins: [createCache()],
      actions: {
        ACTION: () => {},
      },
    })
    
    store.cache.has('ACTION')
    //=> false
    
    store.cache.dispatch('ACTION', undefined, {
      timeout: 100,
    })
    
    store.cache.has('ACTION')
    //=> true
    
    setTimeout(() => {
      store.cache.has('ACTION')
      //=> false
    }, 100)
    

    This fixes issue #28.

  • Breaking Change: Cache is module scoped and don't support multiple instances anymore.

    This fixes an issue with cacheAction cache state different from plugin one.

  • Breaking Change: createCache returns

    This fixes an issue with cacheAction cache state different from plugin one.

  • Breaking Change: Rename main source module and bundles.

    • Main module index.js is now vuex-cache.js
    • CommonJS bundle dist/vuex-cache.cjs.js is now dist/vuex-cache.js
    • ESM bundle dist/vuex-cache.es.js is now dist/vuex-cache.mjs
    • UMD bundle dist/vuex-cache.js is now dist/vuex-cache.umd.js
    • UMD minified bundle dist/vuex-cache.min.js is now dist/vuex-cache.umd.min.js
  • It now supports some of non JSON parseable values as arguments. Like functions, undefined and other values.

    This fixes issue #30.

  • It fallback dispatches to uncached if params have circular references.

    This fixes issue #29.

  • Add JSDoc comments to functions and values.

  • Rename main module, functions and variables.

  • Refactor unit tests and split them into multiple modules.

  • Upgrade dependencies and bundle settings.

  • Create type definitions for TS developers & Editor/IDE intellisense.

    This fixes issue #32.

  • Add MIT License.

  • Improve README.md docs.

    This fixes issue #21.

    • Add Installation on Nuxt.js section to README.md.

      This fixes issue #26.

    • Move Map polyfill notice to Compatibility section.

      Maybe fix the cause of issue #31.

    • Improve Installation section on README.md.

    • Refactor Usage section and move it up.

    • Create API section with docs about cache methods, Payload and Timeout.

    • Remove old docs about cache methods, payload and timeout.

    • Change package.json description and keywords.

superwf
published 2.1.0 •

Changelog

Source

2.1.0

  • Improve documentation.

    • Fix title on README.md;
    • Add CHANGELOG file.
    • Improve Compatibility, Installation sections and move them up on README.md.

    This is part of a pretty big docs improvement suggested by @vjee on issue #21.

  • Add @VitorLuizC to contributors on package.

  • Upgrade dependencies.

  • Remove unused babel, eslint and jest plugins.

  • Improve bundle, test and lint

    • Remove comments and unused env on .eslintrc.js.
    • Remove unused env and plugins on babel.config.js.
    • Delete .eslintignore file.
    • Enforce Yarn and on package scripts.
    • Remove npx and NODE_ENV assignment on package scripts.
superwf
published 1.4.1 •

Changelog

Source

1.4.1

  • Use bili instead of own bundle script. It bundles ESM module down to ES5 and generates UMD and UMD + min modules.

    This is added on PR #13 and fixes issues #8 and #12.

  • Fix a typo on README.md.

    Thanks to @manAbl for PR #15.

superwf
published 1.4.0 •

Changelog

Source

1.4.0

  • Adds an option to define default timeout on actions. timeout option is optional and it's overwritten by action specific timeout.

    import Vuex, { Store } from 'vuex'
    import cache from 'vuex-cache'
    
    const store = new Vuex.Store({
      plugins: [ cache({ timeout: 2000 }) ],
      ...
    })
    

    Improvement suggested by @hvaughan3 on #11.

2
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc