Problem/Motivation

If this field is used in a listing using cache tagging, the field does not update its count in that listing if the usage count changes (i.e. more usage is added), until cache is cleared. This is because the field does not add any cache dependencies.

Steps to reproduce

In an environment with caching enabled, view a usage listing using this field. Add usage for an entity in the listing, and refresh the listing in your browser. The usage count does not change.

Proposed resolution

Add cache dependencies to the render function.

Remaining tasks

Create a merge request from the patch.

User interface changes

None

API changes

None

Data model changes

None

Comments

john.oltman created an issue. See original summary.

john.oltman’s picture

StatusFileSize
new1.72 KB
john.oltman’s picture

StatusFileSize
new2.21 KB

This patch includes a 1 minute refresh, so that new usage is shown. The previous patch will only show changes to existing usage.