opsdev / cache-breaker
Create link to static resources with cache-breaking segment based on md5 of the file
Fund package maintenance!
mrimann
rimann.org/support
www.amazon.de/registry/wishlist/3HLTHWBJOILTU
Installs: 11 390
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 5
Forks: 3
Open Issues: 1
Type:typo3-flow-package
Requires
- php: ^8.0
- neos/flow: ^7.0.0
This package is auto-updated.
Last update: 2024-10-10 07:28:16 UTC
README
This package provides a ViewHelper and a Fusion object that work like their original counterparts, but appending cache breaking segment based on the file's md5.
Installation
Require the package via composer:
composer require "opsdev/cache-breaker"
Usage
Use as a Fluid ViewHelper
{namespace opsdev=OpsDev\CacheBreaker\ViewHelpers}
<link rel="stylesheet" href="{opsdev:resource(path: 'path/to/your/file.css', package: 'Vendor.YourPackageName')}" />
Use as a Fusion object
stylesheets.index = T:Tag {
tagName = 'link'
attributes {
href = OpsDev.CacheBreaker:ResourceUri {
path = 'path/to/your/file.css'
package = 'Vendor.YourPackageName'
}
type = 'text/css'
rel = 'stylesheet'
}
}
Credits
The development of this package is partially sponsored by CodeQ web factory, St Philaret Christian Orthodox Institute and internezzo ag.
Also the following persons have contributed to this package - thanks!
- Dimitri Pisarev
- Simon Schaufelberger
- Guang Ha