lonelyenvoy / python-memoization

A powerful caching library for Python, with TTL support and multiple algorithm options.
MIT License
230 stars 15 forks source link

Switch ON/OFF programatically ? #3

Open vsraptor opened 4 years ago

vsraptor commented 4 years ago

Is there some way to Switch ON/OFF programatically the cache ?

I have a scenario where I have the following logic :

 train() - cycle
 batch predict() - cycle
 predict()

I want to be able to switch memorization ON for batch-predict() cycle, but be OFF otherwise ?