Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
GigantPro committed Jul 19, 2023
1 parent 076f1b0 commit 4b1394e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frozenclass/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
class CacheController:
"""The main class of the cache logic. Includes all caches logic"""
def cache(*, ttl: time | None = time(minute=10)) -> Callable: # ( TTL_end, result )
"""Function-decorate for runtime caching. The cache can either be overwritten or remain until the program terminates.
:param ttl: Time-To-Live of cached valume, defaults to time(minute=10)
:type ttl: time | None, optional
:return: Decorated func
:rtype: Callable
"""
def wrapper_func(target_func: Callable) -> Callable:
__cached_vals = {}

Expand Down

0 comments on commit 4b1394e

Please sign in to comment.