This package is abandoned and no longer maintained. The author suggests using the flowpack/cachebuster package instead.

Cache breaking functionality for static resources in Flow

Installs: 1 341

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

Open Issues: 0


1.0.0 2017-03-17 13:01 UTC

This package is auto-updated.

Last update: 2019-04-18 06:36:56 UTC


MIT license Packagist

Cache Breaking for Flow resources

This package provides a ViewHelper that adds a cache breaking string to resource URIs. The cache breaking string can be updated with a CLI command.

Recommended usage

Replace the default Flow resource.uri ViewHelper with the ViewHelper provided by this package for all resources that should get cache breaking capability:

<link rel="stylesheet" href="{cb:uri.resource(path: 'Build/Styles/Style.css', package: 'My.Package')}" />

You can set far future expires headers for these resources, as the the ViewHelper will add a cache breaking GET parameter to the resource URI.

The GET parameter is only updated when you explicitly flush the Mindscreen_Flow_CacheBreak cache. ./flow flow:cache:flush will not clear this cache, as it is persistent.

As an alternative to cache flushing, you can use the command ./flow cachebreak:update (which does the same thing basically).

You should execute the cachebreak:update command (or the cache flushing) during every deployment (for example as part of your Surf Deployment).