From 8415bc1778ea080aeed69ef2d752f3d0063e26f9 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 8 Jan 2020 01:15:31 -0600 Subject: add a RequestLocalCache class --- CHANGES.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.rst') diff --git a/CHANGES.rst b/CHANGES.rst index 70f5bbb64..e93f8a813 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -82,6 +82,16 @@ Features invoked as part of ``pyramid.scripting.prepare`` and ``pyramid.paster.boostrap``. +- Added ``pyramid.request.RequestLocalCache`` which can be used to create + simple objects that are shared across requests and can be used to store + per-request data. This is useful when the source of data is external to + the request itself. Often a reified property is used on a request via + ``pyramid.config.Configurator.add_request_method``, or + ``pyramid.decorator.reify``, and these work great when the data is + generated on-demand when accessing the request property. However, often + the case is that the data is generated when accessing some other system + and then we want to cache the data for the duration of the request. + Deprecations ------------ -- cgit v1.2.3