Skip to content

Commit f87a494

Browse files
committed
TASK: Fullfill cache backend method interfaces
1 parent 54632b7 commit f87a494

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

Classes/Tus/PartialUploadFileCacheAdapter.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
use Carbon\Carbon;
1717
use Neos\Cache\Frontend\StringFrontend;
18+
use Neos\Utility\Exception\PropertyNotAccessibleException;
19+
use Neos\Utility\ObjectAccess;
1820
use TusPhp\Cache\Cacheable;
1921

2022
class PartialUploadFileCacheAdapter implements Cacheable
@@ -70,22 +72,27 @@ public function set(string $key, $value)
7072

7173
public function delete(string $key): bool
7274
{
73-
$this->partialUploadFileCache->remove($key);
75+
return $this->partialUploadFileCache->remove($key);
7476
}
7577

7678
public function deleteAll(array $keys): bool
7779
{
7880
$this->partialUploadFileCache->flush();
81+
return true;
7982
}
8083

84+
/**
85+
* @throws PropertyNotAccessibleException
86+
*/
8187
public function getTtl(): int
8288
{
83-
89+
return (int)ObjectAccess::getProperty($this->partialUploadFileCache->getBackend(), 'defaultLifetime', true);
8490
}
8591

8692
public function keys(): array
8793
{
88-
// TODO: Implement keys() method.
94+
// @todo implement a replacement for keys() for flow cache backends
95+
return [];
8996
}
9097

9198
public function setPrefix(string $prefix): Cacheable

0 commit comments

Comments
 (0)