librelist archives

« back to archive

Simplest method of caching some integers

Simplest method of caching some integers

From:
Corey Boyle
Date:
2015-07-18 @ 19:22
I have a function that returns an integer I would like to cache for a
minute or so in memory. I'm already using Redis, but I would like to
cache it at the local level also.

I'm planing on deploying to Heroku with at least 2 web dynos.

Is werkzeug.contrib.cache.SimpleCache ok for this type of situation?

Re: [flask] Simplest method of caching some integers

From:
Matt Smith
Date:
2015-07-19 @ 23:11
Yeah sure, also look into flask cache if you plan to extend later.

On Sat, 18 Jul 2015 20:26 Corey Boyle <coreybrett@gmail.com> wrote:

> I have a function that returns an integer I would like to cache for a
> minute or so in memory. I'm already using Redis, but I would like to
> cache it at the local level also.
>
> I'm planing on deploying to Heroku with at least 2 web dynos.
>
> Is werkzeug.contrib.cache.SimpleCache ok for this type of situation?
>
> --
Matt Smith, Riot Games