Skip to main content
# temporal-cache
Time-based cache invalidation

[![Build Status](https://travis-ci.org/timkpaine/temporal-cache.svg?branch=master)](https://travis-ci.org/timkpaine/temporal-cache)
[![Coverage](https://codecov.io/gh/timkpaine/temporal-cache/branch/master/graph/badge.svg)](https://codecov.io/gh/timkpaine/temporal-cache)
[![Waffle.io](https://badge.waffle.io/timkpaine/temporal-cache.png?label=ready&title=Ready)](https://waffle.io/timkpaine/temporal-cache?utm_source=badge)
[![BCH compliance](https://bettercodehub.com/edge/badge/timkpaine/temporal-cache?branch=master)](https://bettercodehub.com/)
[![License](https://img.shields.io/github/license/timkpaine/temporal-cache.svg)](https://pypi.python.org/pypi/temporal-cache/)
[![PyPI](https://img.shields.io/pypi/v/temporal-cache.svg)](https://pypi.python.org/pypi/temporal-cache/)
[![Docs](https://img.shields.io/readthedocs/temporal-cache.svg)](https://temporal-cache.readthedocs.io)



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

```python3

@expire(hour=16)
def fetchFinancialData():

```

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

```python3

@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.

```python3

@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'''
```


Metadata

Release files for temporal-cache 0.0.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 temporal-cache 0.0.3
File Size Uploaded Provenance Actions
temporal-cache-0.0.3.tar.gz 3.8 kB Without provenance Details for temporal-cache-0.0.3.tar.gz

Release files / temporal-cache-0.0.3.tar.gz

Download URL temporal-cache-0.0.3.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1d1b83076657473a071e0e219ffc2de3d7fd4864b627124676db4ce8cc4d4de6
BLAKE2b-256 checksum
How to use checksums
0d207aa91ff8b6dec41a52bf6cd39d21d2d73901124d4322ac9f47739ae77fd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Security for temporal-cache 0.0.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.

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