From 7d021c2ad8892a92f79b0df2e55f0a90ee2e9aba Mon Sep 17 00:00:00 2001 From: zackees Date: Wed, 10 May 2023 15:44:21 -0700 Subject: [PATCH] update readme --- README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 38b61f7..1dd4e4e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ -# template-python-cmd -A template for quickly making a python lib that has a command line program attached +# disklru + +Creates a disk based lru that you can use in your apps. + +Usefull for caches. [![Linting](../../actions/workflows/lint.yml/badge.svg)](../../actions/workflows/lint.yml) @@ -7,10 +10,16 @@ A template for quickly making a python lib that has a command line program attac [![Ubuntu_Tests](../../actions/workflows/push_ubuntu.yml/badge.svg)](../../actions/workflows/push_ubuntu.yml) [![Win_Tests](../../actions/workflows/push_win.yml/badge.svg)](../../actions/workflows/push_win.yml) -Replace `template-python-cmd` and `template_python_cmd` with your command. Run tox until it's -correct. -To develop software, run `. ./activate.sh` +# Usage + +```python +LRU_CACHE_FILE = "cache.db" +cache = DiskLRUCache(LRU_CACHE_FILE, 4) +cache.put("key", "value") +assert cache.get("key1") == "val" +cache.clear() +``` # Windows