Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
.. image:: https://travis-ci.org/jealous/cachez.svg :target: https://travis-ci.org/jealous/cachez
.. image:: https://coveralls.io/repos/jealous/cachez/badge.svg :target: https://coveralls.io/github/jealous/cachez
.. image:: https://img.shields.io/pypi/v/cachez.svg :target: https://pypi.python.org/pypi/cachez
VERSION: 0.1.2
Function decorator that helps to cache/memoize the result of a function/method.
This package contains following decorators.
self
)And one function.
Tested on python 2.7 and python 3.4.
For quick start, check the tutorial section of this page.
Check cachez_test.py
_ for detail examples.
pip install cachez
Apache License version 2
_
cache
... code-block:: python
@cache
def foo(x, y):
...
clear_cache()
... code-block:: python
clear_cache()
instance_cache
.
To clear the method cache on the instance, decorate your clear method
with clear_instance_cache
... code-block:: python
class Foo(object):
@instance_cache
def bar(a, b):
...
@clear_instance_cache
def clear():
...
persisted
decorator.
This decorator takes input parameter which specify when the cache
will expire. The default value for cache expiration is set to 1 day... code-block:: python
class Foo(object):
@persisted()
def default_persist_for_1_day(x):
...
@persisted(seconds=5)
def persist_return_value_for_5_seconds(y):
...
~/.cachez
. You could customize
it by calling set_persist_folder
.To file issue, please visit:
https://github.com/jealous/cachez
Contact author:
Contributors:
.. _Apache License version 2: LICENSE.txt .. _cachez_test.py: cachez_test.py
FAQs
Cache decorator for global or instance level memoize.
We found that cachez demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.