Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Symfony/Component/Cache/Adapter/NullAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @author Titouan Galopin <galopintitouan@gmail.com>
*/
class NullAdapter implements AdapterInterface, CacheInterface, NamespacedPoolInterface
class NullAdapter implements AdapterInterface, CacheInterface, NamespacedPoolInterface, TagAwareAdapterInterface
{
private static \Closure $createCacheItem;

Expand Down Expand Up @@ -108,4 +108,9 @@ private function generateItems(array $keys): \Generator
yield $key => $f($key);
}
}

public function invalidateTags(array $tags): bool
{
return true;
}
}
7 changes: 7 additions & 0 deletions src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,11 @@ public function testCommit()
$this->assertTrue($adapter->saveDeferred($item));
$this->assertTrue($this->createCachePool()->commit());
}

public function testInvalidateTags()
{
$adapter = $this->createCachePool();

self::assertTrue($adapter->invalidateTags(['foo']));
}
}
5 changes: 5 additions & 0 deletions src/Symfony/Component/Config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

7.4
---

* Add TagAwareAdapterInterface to NullAdapter

7.3
---

Expand Down
Loading