
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
.. 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 flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.