Skip to content

Commit

Permalink
#5
Browse files Browse the repository at this point in the history
changed filename of cache to include hash of site()->url() to support mulisite setup

Signed-off-by: Bruno Meilick <[email protected]>
  • Loading branch information
bnomei committed Jan 8, 2019
1 parent 67c8cd8 commit 2c257b3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion classes/Fingerprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static function process($file)
kirby()->cache('bnomei.fingerprint')->flush();
}

$cacheWithVersion = 'lookup' . str_replace('.','', kirby()->plugin('bnomei/fingerprint')->version());
$cacheWithVersion = 'lookup' . str_replace('.','', kirby()->plugin('bnomei/fingerprint')->version()) . '-' . md5(site()->url());
$lookup = kirby()->cache('bnomei.fingerprint')->get($cacheWithVersion);
if (!$lookup) {
$lookup = [];
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/kirby3-fingerprint",
"type": "plugin",
"version": "2.2.4",
"version": "2.2.5",
"description": "File Method and css/js helper to add cachbusting hash and optional Subresource Integrity to file",
"license": "MIT",
"authors": [
Expand Down Expand Up @@ -48,6 +48,7 @@
},
"scripts": {
"zip": [
"touch kirby3-fingerprint.zip",
"rm kirby3-fingerprint.zip",
"composer install --no-dev",
"composer remove getkirby/cms",
Expand Down
23 changes: 14 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2c257b3

Please sign in to comment.