On Thursday, September 29th, 2022 at 07:18, Robert Latest via Python-list
wrote:
> Hi Chris and dh,
>
> thanks for your --as usually-- thoughtful and interesting answers. Indeed,
> when
> doing these web applications I find that there are several layers of useful,
> maybe less useful, and unk
Hi Chris and dh,
thanks for your --as usually-- thoughtful and interesting answers. Indeed, when
doing these web applications I find that there are several layers of useful,
maybe less useful, and unknown caching. Many of my requests rely on a
notoriously unreliable read-only database outside of m
On 29/09/2022 07.22, Robert Latest via Python-list wrote:
...
> This is what I came up with. I'm quite happy with it so far. Question: Am I
> being too clever? is it too complicated? Am I overlooking something that will
> come back and bite me later? Thanks for any comments!
Thank you for the ch
On Thu, 29 Sept 2022 at 05:36, Robert Latest via Python-list
wrote:
> in a (Flask) web application I often find that many equal (SQLAlchemy) queries
> are executed across subsequent requests. So I tried to cache the results of
> those queries on the module level like this:
>
> @lru_cache()
>
Hi all,
in a (Flask) web application I often find that many equal (SQLAlchemy) queries
are executed across subsequent requests. So I tried to cache the results of
those queries on the module level like this:
@lru_cache()
def query_db(db, args):
# do the "expensive" query
r