Most of the time I use `timezone.now` in conjunction with
`timezone.timedelta`, however, today I realized it was not publicly
exported in the module.
Most of the time, using it saves an import from `datetime` (e.g.,
timezone.now + timezone.timedelta is a common pattern). I presume this use
ca
3855af9ac
>
> This would give the simplicity of using a @cache_results decorator,
> while allowing to bypass or refresh the cache when needed.
>
> I’m not sure but likely there are some packages that have a similar
> function.
>
> Best,
> Diederik
>
> Op 2 jan. 2023, om 1
I would like to see more opinions on this, I am using this type of utility
in almost every project I make and it seems to me it would a decent utility
function.
26 Ağustos 2022 Cuma tarihinde saat 14:45:13 UTC+3 itibarıyla suayip
uzulmez şunları yazdı:
> It doesn't necessarily have
rySets are lazy, so it could
> be surprising to decorate a function that returns a QuerySet that is not
> yet resolved.
>
> On Wed, Aug 24, 2022 at 3:49 PM suayip uzulmez wrote:
>
>> Usually, I need to construct a simple cache pipeline to optimize database
>> access us
Usually, I need to construct a simple cache pipeline to optimize database
access using low-level cache API (django.core.cache).
I think we could use a decorator as such to ease this process:
cached_context(key, *, timeout, cache)
I know higher-level utilities exist such as cache_page, however I