Skip to content

altescy/cachestore

Repository files navigation

CacheStore

Actions Status Python version License pypi version

CacheStore is a simple cache management system for Python functions. You can reuse the cached results even accross different executions.

cachestore command enables you to manage the cached results from command line. Please see --help for more details.

Features

  • Caching execution results by decorating target functions easily
  • Exporting caches into an external storage to reuse them access different exeutions
  • Detecting appropreate caches based on argumetns/source code of functions
  • Changing cache behavior via configuration file (see exmaples)
  • Providing a useful command line tool to manage caches
  • Written in pure Python, no external dependencies

Installation

pip install cachestore

Usage

Python

from cachestore import Cache

cache = Cache()

@cache()
def awesome_function(x, *, y="y", **kwargs):
    ...

CLI

$ cachestore --help
usage: cachestore

positional arguments:
  {list,prune,remove}

optional arguments:
  -h, --help           show this help message and exit
  --version            show program's version number and exit