
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@specter/redux-effects-specter-cache
Advanced tools
Caching middleware for @specter/redux-effects-specter.
npm install --save @specter/specter \ # peer dependency
@specter/redux-effects-specter \ # peer dependency
@specter/redux-effects-specter-cache
Installing the middleware:
import { createStore, applyMiddleware } from 'redux';
import { Client } from '@specter/specter';
import stepsMiddleware from 'redux-effects-steps';
import specterMiddleware from '@specter/redux-effects-specter';
import specterCacheMiddleware from '@specter/redux-effects-specter-cache';
import rootReducer from './reducers';
const client = new Client({
base: '/xhr'
});
const cacheConfig = {
max: 500,
maxAge: 1000 * 60 * 60
};
const cacheMiddlewareConfig = {
excludes: [
"greet" // expected service name of specter
]
}
const store = createStore(
rootReducer,
applyMiddleware(
stepsMiddleware,
specterCacheMiddleware({ cacheConfig, cacheMiddlewareConfig }),
specterMiddleware(client)
)
);
redux-effects-specter-cache must be applied before redux-effects-specter.
specterCacheMiddleware(cacheConfig, [options])
Creates redux middleware.
options
(Object) : LRE-cache option and middleware option
cacheConfig
(Object): See
lru-cahce API docs
for more info.middlewareOption
(Object):
excludes
(Array): An array of the resource names to not use the cache.
Defaults []
.fromCache
(Function): Checks whether an action is target to obtain from cache.
Defaults () => true
.
action
(Object): An action.state
(Object): The current state of the Store.true
, uses cache to obtain the resource.toCache
(Function): Checks whether an action is target to store to cache.
Defaults () => true
.
action
(Object): An action.state
(Object): The current state of the Store.true
, saves the obtaining resource to cache.resetCache
(Function): reset cache if resetCache function returns true.
Defaults () => false
.
action
(Object): An action.state
(Object): The current state of the Store.true
, reset all cache.FAQs
cache structure for redux middleware of specter
The npm package @specter/redux-effects-specter-cache receives a total of 1 weekly downloads. As such, @specter/redux-effects-specter-cache popularity was classified as not popular.
We found that @specter/redux-effects-specter-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.