IWatcher
in
check the storage backends for updates and change the cache accordingly
Tags
Table of Contents
Constants
- CHECK_ALWAYS = 2
- CHECK_NEVER = 0
- CHECK_ONCE = 1
Methods
- checkUpdate() : bool
- check $path for updates and update if needed
- cleanFolder() : mixed
- remove deleted files in $path from the cache
- getPolicy() : int
- needsUpdate() : bool
- Check if the cache for $path needs to be updated
- setPolicy() : mixed
- update() : mixed
- Update the cache for changes to $path
Constants
CHECK_ALWAYS
public
mixed
CHECK_ALWAYS
= 2
Tags
CHECK_NEVER
public
mixed
CHECK_NEVER
= 0
Tags
CHECK_ONCE
public
mixed
CHECK_ONCE
= 1
Tags
Methods
checkUpdate()
check $path for updates and update if needed
public
checkUpdate(string $path[, ICacheEntry|null $cachedEntry = null ]) : bool
Parameters
- $path : string
- $cachedEntry : ICacheEntry|null = null
Tags
Return values
bool —true if path was updated
cleanFolder()
remove deleted files in $path from the cache
public
cleanFolder(string $path) : mixed
Parameters
- $path : string
Tags
getPolicy()
public
getPolicy() : int
Tags
Return values
int —either IWatcher::CHECK_NEVER, IWatcher::CHECK_ONCE, IWatcher::CHECK_ALWAYS
needsUpdate()
Check if the cache for $path needs to be updated
public
needsUpdate(string $path, ICacheEntry $cachedData) : bool
Parameters
- $path : string
- $cachedData : ICacheEntry
Tags
Return values
boolsetPolicy()
public
setPolicy(int $policy) : mixed
Parameters
- $policy : int
-
either IWatcher::CHECK_NEVER, IWatcher::CHECK_ONCE, IWatcher::CHECK_ALWAYS
Tags
update()
Update the cache for changes to $path
public
update(string $path, ICacheEntry $cachedData) : mixed
Parameters
- $path : string
- $cachedData : ICacheEntry