Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enable theme caches by default in start-dev #22711

@stianst

Description

@stianst

Description

Currently theme caching is disabled by default in start-dev:

%dev.spi-theme-cache-themes=false
%dev.spi-theme-cache-templates=false
%dev.spi-theme-static-max-age=-1

Disabling theme caching will have a negative impact on loading the UIs, especially admin and account that loads a fairly big amount of resources. In most cases a developer is not using start-dev with the intention of creating/editing themes, and as such by default we should prioritise performance over convenience.

I would consider adding a top-level config option around themes, elevating the SPI options to a higher level. Something like:

theme-cache=true|false
theme-cache-themes=true|false
theme-cache-templates=true|false
theme-cache-client-gzip=true|false
theme-cache-client-max-age=<number>

Where theme-cache is a convenience option that fully disables all caching, so basically a short-hand to:

theme-cache-themes=false
theme-cache-templates=false
theme-cache-client-gzip=false
theme-cache-client-max-age=-1

Currently the existing options are awkward and isn't documented in the server guides:

spi-theme-cache-themes=false
spi-theme-cache-templates=false
spi-theme-static-max-age=-1

Discussion

No response

Motivation

No response

Details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions