FormatOpt¶
-
class
privex.helpers.decorators.
FormatOpt
(value)[source]¶ This enum represents various options available for
r_cache()
‘sformat_opt
parameter.To avoid bloating the PyDoc for
r_cache
too much, descriptions for each formatting option is available as a short PyDoc comment under each enum option.Usage:
>>> @r_cache('mykey', format_args=[0, 'x'], format_opt=FormatOpt.POS_AUTO)
-
__init__
() Initialize self. See help(type(self)) for accurate signature.
-
Attributes¶
Attributes
Only use kwargs for formatting the cache key - requires named format placeholders, i.e. |
|
Use both |
|
First attempt to format using |
|
Only use positional args for formatting the cache key, kwargs will be ignored completely. |