Skip to main content

database caching for dynamic programming

Project description

DB Cache Documentation Status Updates

database caching for dynamic programming




import db_cache

# Instantiate cache object that connects to PostgreSQL with provided credential
cache = db_cache.Cache(database="db_name", user="admin", password="12345", host="localhost")

# Create decorater that cache function result using provided table name
def some_expensive_function(large_int):
    prime1, prime2 = factoring(large_int)
    return (prime1, prime2)

# Return cached value if possible, otherwise compute and cache result.


  • TODO


This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.


0.1.0 (2016-11-04)

  • First release on PyPI.

Project details

Download files

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

Files for db_cache, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size db_cache-0.1.2-py2.py3-none-any.whl (5.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page