Repeated unnecessary cache get calls

Created on 15 March 2023, over 1 year ago
Updated 20 March 2023, over 1 year ago

Problem/Motivation

We added caching for the block visibility in Social Core, but it is requesting the cache data numerous times. This is unnecessary.

Steps to reproduce

Set a breakpoint in the Social Core module at around the lines where it is doing $cache->get('social_core.block_visibility_cache'). This is happening pretty often.

Proposed resolution

When doing these block access checks, what we try to do is first check if the request already statically cached which blocks it wants to alter. Otherwise, it gets it from the DB, to see if someone already has done the caching in the database. Otherwise, it sets the cache in the db for the next person/request, as well as statically for the request.

Remaining tasks

N/a

User interface changes

N/a

API changes

N/a

Data model changes

N/a

πŸ› Bug report
Status

Fixed

Version

11.8

Component

Code (back-end)

Created by

πŸ‡³πŸ‡±Netherlands bramtenhove

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024