Krukov / cashews

Cache with async power
MIT License
371 stars 22 forks source link

cache_control_ttl can't be used directly with cache api #219

Closed sergey-burkov-trailstone closed 2 months ago

sergey-burkov-trailstone commented 2 months ago

Has to wrap it with ttl_to_seconds, e.g.

        await cache.set_many(
            {f"tsds:catalogue:{tsid}": info for tsid, info in catalog.items()},
            expire=ttl_to_seconds(
                cache_control_ttl(CACHEWS_DEFAULT_TTL), with_callable=True
            ),
        )
Krukov commented 2 months ago

Fixed in 7.1.0, please recheck it )