Skip to main content

Package to fast and easy cache

Project description

my Sweet Cache

This project let make fast and simply cache

autors

Bartłomiej Chwiłkowski (github: chwilko)

Structure

mySweetCache: mySweetCache.py: main functions utils.py: other function usefull to

Functions

cache: decorator to cache the result of the function use_par: decorator to set first function argument use_pars: decorator to set first function arguments

How to use

@cache("key")
def long_counting_function():
    ...

long_counting_function()

After first call this function result is saved in .MScache_files/key In next call instead recount value will be read from cache. To recount call long_counting_function(use_cache=False) then cache will be overwrited or delete .MScache_files/try file.

WARNING! If you define two function with the same key, there two functions will share the same cache file.

Licence

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mysweetcache-0.1.0.tar.gz (538.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mysweetcache-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file mysweetcache-0.1.0.tar.gz.

File metadata

  • Download URL: mysweetcache-0.1.0.tar.gz
  • Upload date:
  • Size: 538.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for mysweetcache-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25a0352af72c4ea0ca2a9c3860a97988e845f3c776bccf4079bc8bd5e23f5ee5
MD5 2ebc9661c97a4dfc04db35da173c23d0
BLAKE2b-256 15247c5a6dd0bf8459c7beb192c69965286f72a4447fff4a20c4e9f61d875e8d

See more details on using hashes here.

File details

Details for the file mysweetcache-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mysweetcache-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for mysweetcache-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71bfa5c19c58d96082a52f8c79e9f1ccc4438fbb3f9e22b7be85fffffaa16509
MD5 5ce6aef1bd8de03e5d7dca31adcd0b59
BLAKE2b-256 2cc3b804f5ceb4d2965a24fa3c11a89edab2213809c3e5e33f8af77ea9766c60

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page