youknowone / ring

Python cache interface with clean API and built-in memcache & redis + asyncio support.
http://ring-cache.readthedocs.io/en/latest/
Other
478 stars 37 forks source link

Unexpected behavior when arg is input as a string or literally same integer #197

Open shenrun opened 1 year ago

shenrun commented 1 year ago
@ring.dict({})
def f(a):
    print("not using cache")
    return str(a)
f(1)
f.storage.backend
f("1")
f.storage.backend

The output is shown as below: not using cache '1' {'main.f:1': '1'} '1' {'main.f:1': '1'}