????
Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/clwpos/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/clwpos/__pycache__/scoped_cache.cpython-311.pyc |
� P��rCX�� �L � d Z ddlmZ ddlmZ i Zdaed� � � Zd� Zd� Z dS ) aO This is a simple wrapper around lru_cache which allows us to enable caching only within some scope defined by contextmanager It makes it easier to cache some functions e.g. only inside wpos-user get scope and still be able to get fresh data in wpos-user enable where cached commands might return different results because of outside � )�contextmanager)� lru_cacheFc # � K � t rt d� � � da dV � t � � da dS # t � � da w xY w)zK This context manager sets global marker which enables caching znested scopes are not supportedTNF)�CACHING_ENABLED�RuntimeError�_clear_cache� � �py/clwpos/scoped_cache.py�enable_cachingr sa � � � � � >��<�=�=�=� ��� ������������� ���������s �2 �Ac �f � t � � � D ]} | � � � �dS )z1 Clear cache of all registered functions N)�_CACHED_FUNCTIONS�values�cache_clear)�funcs r r r "