Skip to content

vseager/magento-module-cachebuster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

magento-module-cachebuster

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;
}

About

Magento CacheBuster Module by outer/edge

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%