Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show project cache usage stats in widget #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

hjelmevold
Copy link
Member

In order to help Booster users debug their cache configuration, the Booster widget in Content Studio now not only allows you to purge cache for the project, but it also shows cache usage statistics.

  • Shows a table with up to 20 of the most cached paths that belong to the current project, sorted descending by number of cache entries.
  • Each path has a details element that allows for drilling down into the cache for the current path, with how many cached variations there are for certain querystring parameters. This allows users to discover that an inconsequential parameter (e.g. ?sometrackingparam=abc123) is filling up unnecessarily many cache entries when there is otherwise no change in rendered content between these variations.
  • When each details element is expanded on mouse click, its details are fetched with AJAX, and only fetched upon first expansion attempt.

const allCachedPaths = boosterRepo.query({
start: 0,
count: 0,
query: `project = '${project}'`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use query dsl

return queryString.split('&').reduce((acc, pair) => {
const parts = pair.split('=');
const key = parts[0];
const value = parts[1];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may fail for legal ?q

const pathUrls = boosterRepo.query({
start: 0,
count: 0,
query: 'path = "' + path + '"',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use query dsl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants