New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vuex-cache

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuex-cache - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

11

index.js

@@ -5,4 +5,4 @@ 'use strict';

var cache = Object.create(null);
store.cacheDispatch = function () {
var type = arguments.length <= 0 ? undefined : arguments[0];
store.cacheDispatch = function cacheDispatch() {
var type = arguments[0];
if (type in cache) {

@@ -15,6 +15,5 @@ return cache[type];

store.removeCache = function () {
var type = arguments.length <= 0 ? undefined : arguments[0];
if (type in cache) {
delete cache[type];
store.removeCache = function (actionName) {
if (actionName in cache) {
delete cache[actionName];
return true;

@@ -21,0 +20,0 @@ }

{
"name": "vuex-cache",
"version": "0.3.0",
"version": "0.3.1",
"description": "cache vuex action",

@@ -15,3 +15,3 @@ "main": "index.js",

"build": "NODE_ENV=production rollup -c",
"prepublish": "npm run lint && npm run build"
"prepublish": "npm run lint && npm run cover && npm run build"
},

@@ -18,0 +18,0 @@ "keywords": [

@@ -8,3 +8,3 @@ # vuex cache action

## install
```
```bash
npm install vuex-cache

@@ -15,3 +15,4 @@ ```

```
```javascript
import Vuex from 'vuex'
import vuexCache from 'vuex-cache'

@@ -39,3 +40,3 @@ const store = new Vuex.Store({

```
```javascript
store.cacheDispatch(ACTION_NAME)

@@ -47,8 +48,8 @@ ```

```
```javascript
store.removeCache(ACTION_NAME)
```
clear cached action, will **not** clear the data in store. when call cacheDispatch with same type, the request in that action will run again.
remove cached action, will **not** remove the data in store. when call cacheDispatch with same type, the request in that action will run again.
```
```javascript
store.hasCache(ACTION_NAME)

@@ -58,5 +59,5 @@ ```

```javascript
store.clearCache()
```
store.clearCache
```
clear all cached keys
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