SessionCacheInterface
in
Interface for session cache implementations.
Implementations of this interface are used internally by the library to cache FileMaker Data API session tokens. These tokens are sensitive credentials that grant access to the FileMaker Data API on behalf of the authenticated user. Implementors must ensure that cached values are stored securely and are not accessible to unauthorized parties.
This interface should not be implemented directly. Instead, extend AbstractSessionCache, which provides the cache key and TTL management required by this interface, and implement the three cache methods.
Tags
Table of Contents
Methods
- delete() : bool
- Deletes the cached FileMaker Data API session token for the current session.
- get() : string|null
- Retrieves the cached FileMaker Data API session token for the current session.
- set() : bool
- Persists a FileMaker Data API session token in the cache.
- setKey() : void
- Sets the cache key for the current session.
- setTtl() : void
- Sets the time-to-live for cached session tokens.
Methods
delete()
Deletes the cached FileMaker Data API session token for the current session.
public
delete() : bool
The cache key is managed internally by the library and set via setKey() prior to this method being called.
Return values
bool —True on success, false if the key did not exist or deletion failed.
get()
Retrieves the cached FileMaker Data API session token for the current session.
public
get() : string|null
The cache key is managed internally by the library and set via setKey() prior to this method being called.
Return values
string|null —The cached session token, or null if no token exists for the current key.
set()
Persists a FileMaker Data API session token in the cache.
public
set(string $value) : bool
The value being stored is a sensitive FileMaker Data API session token. Implementors must ensure this value is stored securely and protected from unauthorized access, as it grants access to the FileMaker Data API on behalf of the authenticated user.
The cache key and TTL are managed internally by the library and set via setKey() and setTtl() prior to this method being called.
Parameters
- $value : string
-
The FileMaker Data API session token to store. This is a sensitive credential and must be treated as such.
Return values
bool —True on success, false on failure.
setKey()
Sets the cache key for the current session.
public
setKey(string $key) : void
This method is called internally by the library and should not be called manually. The key will not change during a single PHP request.
Parameters
- $key : string
-
The cache key to use for subsequent cache operations.
setTtl()
Sets the time-to-live for cached session tokens.
public
setTtl(int $ttl) : void
This method is called internally by the library and should not be called manually. The TTL will not change during a single PHP request.
Parameters
- $ttl : int
-
Time-to-live in seconds for the cached session token.