Skip to content

Commit

Permalink
Moved features up in the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
umarbutler committed Mar 12, 2024
1 parent be310c7 commit bb1bc04
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@

`local-cache` is an *easy-to-use* Python library for lightning-fast persistent function caching. It is capable of caching both synchronous and asynchronous functions as well as methods, and is also process-safe and thread-safe.

## Features 🎯
- **⚡ Lightning-fast**: `local-cache` can cache a function call in 400 nanoseconds and return it back in a single millisecond.
- **💽 Persistent**: cached returns persist across sessions and are stored locally.
- **⌛ Stale-free**: cached returns may be given shelf lives, after which they will be automatically flushed out.
- **🦺 Process- and thread-safe**: interprocess file locks prevent processes and threads from writing over each other.
- **⏱️ Async-compatible**: asynchronous functions can be cached with the same decorator as synchronous ones.
- **👨‍🏫 Class-compatible**: methods can be cached with the same decorator as functions (although the `self` argument will always be ignored).

## Installation 📦
`local-cache` may be installed with `pip`:
```bash
Expand Down Expand Up @@ -44,14 +52,6 @@ my_function.clear_cache() # Clear out all cached returns.
my_function.delete_cache() # Delete the cache.
```

## Features 🎯
- **⚡ Lightning-fast**: `local-cache` can cache a function call in 400 nanoseconds and return it back in a single millisecond.
- **💽 Persistent**: cached returns persist across sessions and are stored locally.
- **⌛ Stale-free**: cached results can be given shelf lives, after which they will be automatically flushed out.
- **🦺 Process- and thread-safe**: interprocess file locks prevent processes and threads from writing over each other.
- **⏱️ Async-compatible**: asynchronous functions can be cached with the same decorator as synchronous ones.
- **👨‍🏫 Class-compatible**: methods can be cached with the same decorator as functions (although the `self` argument will always be ignored).

## API 🧩
### `cache()`
```python
Expand Down

0 comments on commit bb1bc04

Please sign in to comment.