cache3 icon indicating copy to clipboard operation
cache3 copied to clipboard

SafeCache still mentioned in quickstart

Open saily opened this issue 2 years ago • 2 comments

A search/grep through the source indicates that SafeCache does no longer exist. It somehow got refactored after v0.3.3 release, see this commit). As the quickstart is mentioning SafeCache, it should be fixed to help people use this excellent package and not get stuck on the first try.

Should be an easy fix for @StKali, as SafeCache is just mentioned in docs/source/usage.rst.

saily avatar Apr 24 '23 07:04 saily

Thank you very much for your feedback. I apologize for the inconvenience caused by my failure to update the documentation promptly when I updated the source code. I will update it immediately, and if you are interested, you are welcome to help improve it. @saily

SafeCache has been changed to DiskCache, and you can use it like this.

from cache3 import DiskCache

cache: DiskCache = DiskCache()
cache.set('key', 'value')
# True
cache.get('key')
# 'value'
cache.set('key', 'value with tag', tag='t1')
cache.get('key', tag='t1')
# 'value with tag'

StKali avatar Apr 24 '23 07:04 StKali

https://stkali.github.io/cache3/usage.html#minicache still has references to SafeCache

Eeems avatar Dec 29 '23 00:12 Eeems