This commit is contained in:
Andrea Cavalli 2023-08-22 13:05:40 +02:00
parent b0b22a1358
commit 21fed88d76
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@
<groupId>org.warp.filesponge</groupId>
<artifactId>FileSponge</artifactId>
<version>0.3.1</version>
<version>0.3.2</version>
<name>FileSponge</name>

View File

@ -70,7 +70,7 @@ class DiskCacheImpl implements DiskCache {
@Override
public void writeMetadataSync(URL url, Metadata metadata, boolean force) {
// Check if this cache should cache the url, otherwise do nothing
if (!shouldCache.test(url)) return;
if (!force && !shouldCache.test(url)) return;
var key = serializeUrl(url);
@ -130,7 +130,7 @@ class DiskCacheImpl implements DiskCache {
@Override
public void writeContentBlockSync(URL url, DataBlock dataBlock, boolean force) {
// Check if this cache should cache the url, otherwise do nothing
if (!shouldCache.test(url)) {
if (!force && !shouldCache.test(url)) {
return;
}