Skip to content

nocache: Memory usage gets bigger and bigger #7039

@j3ll3yfi5h

Description

@j3ll3yfi5h

Bug description

Using logged_in condition inside nocache tags causes memory usage to get bigger and bigger

nocache tags files (storage/framework/views/nocache) are created on every page request and get never cleaned.

How to reproduce

Add a collection with entries.

{{ collection from="your_collection" }}
	{{ title|wrap:h2 }}
	{{ nocache }}
		{{ if logged_in }}Logged in{{ else }}Logged out{{ /if }}
	{{ /nocache }}
{{ /collection }}

Bildschirm­foto 2022-11-11 um 16 54 10
Bildschirm­foto 2022-11-11 um 16 54 20
Bildschirm­foto 2022-11-11 um 16 54 30
Bildschirm­foto 2022-11-11 um 16 54 46
Bildschirm­foto 2022-11-11 um 16 54 57

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 9.39.0
PHP Version: 8.0.16

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

runtime (new)

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions