pastas.decorators.temporarily_disable_cache#
- pastas.decorators.temporarily_disable_cache()#
Context manager to temporarily disable caching.
Examples
To temporarily disable the cache (if it is currently active):
>>> with ps.temporarily_disable_cache(): >>> # Caching is disabled within this block >>> ml.simulate()
Alternatively you can use the ps.options.cache attribute directly to disable caching as needed:
>>> ps.options.cache = False # Disable caching >>> ml.simulate() >>> ps.options.cache = True # Re-enable caching