outeredge/magento-module-cachebuster

Magento CacheBuster Module by outer/edge

Installs: 3 780

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 6

Forks: 1

Open Issues: 0

Type:magento-module

pkg:composer/outeredge/magento-module-cachebuster

1.0.6 2017-05-17 10:22 UTC

This package is auto-updated.

Last update: 2025-10-14 22:01:30 UTC


README

Adds md5 hash to assets for cachebusting post-deployment.

mod_rewrite configuration

Add the following rewrite rule to your .htaccess file

<IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)\.([0-9a-f]{32})\.(.+)$ $1.$3 [L]
</IfModule>

nginx configuration

Add the following into your server block

location ~ "(.+)\.([0-9a-f]{32})\.(.+)$" {
    expires max;
    try_files $uri $1.$3 =404;
}