Issue Bug Closed

#80138PageRepository uses local instance cache, should use runtime cache

Claus Due 03/04/17, 16:44 updated 10/02/18, 11:02

Description

Problem:

Methods getPage() and others on PageRepository are intended for FE use which means the result is okay to cache (in memory). There are already caching measures implemented, but they have a significant limitation. They only work for the one instance of PageRepository.

Demonstrating the problem, ContentRenderer will create a new instance of PageRepository for every content element you render. This means that X number of additional and identical SQL requests get dispatched. On some sites this can number in the several hundreds, which further gets compacted by the user of a remote DB.

Scope:

Affects both master and LTS.

Solution:

Implementing runtime cache as substitute for local class variable cache.

Reviews 1