mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-24 14:18:48 +02:00
fix(CacheInterface): logic bug in getTime (#3491)
* fix(CacheInterface): logic bug in getTime * test
This commit is contained in:
parent
18e1597361
commit
a9fd3b9e61
11 changed files with 24 additions and 22 deletions
|
@ -27,12 +27,6 @@ saveData(mixed $data): self
|
|||
|
||||
## The `getTime` function
|
||||
|
||||
This function returns the last write time for the cache, or `false` if the cache does not yet exist. Please notice that 'cache' refers to one specific item in the cache repository and might require additional data to identify a specific item (introduce custom functions where necessary!).
|
||||
|
||||
```PHP
|
||||
getTime(): int, false
|
||||
```
|
||||
|
||||
## The `purgeCache` function
|
||||
|
||||
This function removes any data from the cache that is not within the given duration. The duration is specified in seconds and defines the period between now and the oldest item to keep.
|
||||
|
@ -70,4 +64,4 @@ class MyTypeCache implements CacheInterface {
|
|||
}
|
||||
}
|
||||
// Imaginary empty line!
|
||||
```
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue