Skip to main content

Tiny Cache

What is TinyCache?

tinycache is a python modules base on local file for any python data struct

Programming Language

  • python 2.7
  • python 3.7

Install

pip install tinycache 

Quick Start

use python decorators syntax to wrap the call target

from tinycache import WithCache

@WithCache(5)
def Add(a, b):
    return a + b

class Foo():
    @WithCache(5)
    def Bar(self, a, b):
        return a - b

Cache File Format

cache file is json format, with filename look like './cache/<md5_of_key_str>'

{
    "created_at": 1581652043.872242,
    "expired_at": 1581652048.872242,
    "key_str": "Add(&<class 'int'>=1&<class 'int'>=2)",
    "key": "9d0aa1c9634aa575696710c7dfb9f018",
    "value": 3
}

Metadata

Release files for tinycache 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tinycache 0.1.3
File Size Uploaded Provenance Actions
tinycache-0.1.3.tar.gz 2.5 kB Without provenance Details for tinycache-0.1.3.tar.gz

Release files / tinycache-0.1.3.tar.gz

Download URL tinycache-0.1.3.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
60174a216664b6f1afb68e89cbbe8d550ce71d11bb38dab71320a83e79be973f
BLAKE2b-256 checksum
How to use checksums
345e79eedf9b5077d480542e6fc00d0d780f1088bb2b319c3169acd95f2bc039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/2.7.15

Security for tinycache 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page