Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Time based function caching

Project description

# temporal-cache
Time-based cache invalidation

[![Build Status](](
[![BCH compliance](](

## Why?
I needed something that would automagically refresh at 4:00pm when markets close.


def fetchFinancialData():


## Interval Cache
The interval cache expires every `time` interval since its first use


@interval(seconds=5, minutes=2)
def myfoo():
'''myfoo's lru_cache will expire 2 minutes, 5 seconds after last use'''

## Expire Cache
The expire cache expires on the time given, in scheduler/cron style.


@expire(second=5, minute=2)
def myfoo():
'''myfoo's lru_cache will expire on the second minute, fifth second of every hour, every day, etc'''

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 temporal-cache, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size temporal-cache-0.0.3.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page