dgilland / cacheout

A caching library for Python
https://cacheout.readthedocs.io
MIT License
421 stars 44 forks source link

Why not using cache[key] = value? #21

Closed onebula closed 2 years ago

dgilland commented 2 years ago

It was an intentional design decision not to implement __getitem__ and __setitem__. I only wanted a single way to get/set keys.

onebula commented 2 years ago

Besides, cache.get(key) doesn't raise KeyError when key does not exist, is it an intentional design?

dgilland commented 2 years ago

Yes, that was also intentional.