Skip to content

[5.x] Prevent excessive nocache cache growth#9999

Merged
jasonvarga merged 1 commit intostatamic:masterfrom
JohnathonKoster:prevent-excessive-nocache-cache-growth
May 7, 2024
Merged

[5.x] Prevent excessive nocache cache growth#9999
jasonvarga merged 1 commit intostatamic:masterfrom
JohnathonKoster:prevent-excessive-nocache-cache-growth

Conversation

@JohnathonKoster
Copy link
Copy Markdown
Contributor

@JohnathonKoster JohnathonKoster commented May 4, 2024

This PR removes the randomness within nocache region keys, and instead relies on the session's URL and an incrementing value to determine the nocache region key. This allows the nocache regions to be unique within each session, but also not get regenerated on each request.

An easy way to test this behavior is to run php please ssg:generate on a decently sized site that contains {{ nocache }}{{ /nocache }} somewhere. Subsequent SSG runs should not cause the storage/statamic/static-urls-cache folder size to double on each run.

@jasonvarga jasonvarga merged commit a32c923 into statamic:master May 7, 2024
@jasonvarga jasonvarga deleted the prevent-excessive-nocache-cache-growth branch May 7, 2024 22:02
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