|
258 | 258 | // also give proper adapter arguments for its instantiation below. |
259 | 259 | // @see https://symfony.com/doc/current/components/cache.html#available-cache-adapters |
260 | 260 | ModuleConfig::OPTION_PROTOCOL_CACHE_ADAPTER => null, |
261 | | - //ModuleConfig::OPTION_PROTOCOL_CACHE_ADAPTER => \Symfony\Component\Cache\Adapter\FilesystemAdapter::class, |
262 | | - //ModuleConfig::OPTION_PROTOCOL_CACHE_ADAPTER => \Symfony\Component\Cache\Adapter\MemcachedAdapter::class, |
| 261 | +// ModuleConfig::OPTION_PROTOCOL_CACHE_ADAPTER => \Symfony\Component\Cache\Adapter\FilesystemAdapter::class, |
| 262 | +// ModuleConfig::OPTION_PROTOCOL_CACHE_ADAPTER => \Symfony\Component\Cache\Adapter\MemcachedAdapter::class, |
263 | 263 |
|
264 | | - // Federation cache adapter arguments used for adapter instantiation. Refer to documentation for particular |
| 264 | + // Protocol cache adapter arguments used for adapter instantiation. Refer to documentation for particular |
265 | 265 | // adapter on which arguments are needed to create its instance, in the order of constructor arguments. |
266 | 266 | // See examples below. |
267 | 267 | ModuleConfig::OPTION_PROTOCOL_CACHE_ADAPTER_ARGUMENTS => [ |
268 | 268 | // Adapter arguments here... |
269 | 269 | ], |
270 | 270 | // Example for FileSystemAdapter: |
271 | | - //ModuleConfig::OPTION_FEDERATION_CACHE_ADAPTER_ARGUMENTS => [ |
272 | | - // 'openidFederation', // Namespace, subdirectory of main cache directory |
273 | | - // 60 * 60 * 6, // Default lifetime in seconds (used when particular cache item doesn't define its own lifetime) |
274 | | - // '/path/to/main/cache/directory' // Must be writable. Can be set to null to use system temporary directory. |
275 | | - //], |
276 | | - // Example for MemcachedAdapter: |
277 | | - //ModuleConfig::OPTION_FEDERATION_CACHE_ADAPTER_ARGUMENTS => [ |
278 | | - // // First argument is a connection instance, so we can use the helper method to create it. In this example a |
279 | | - // // single server is used. Refer to documentation on how to use multiple servers, and / or to provide other |
280 | | - // // options. |
281 | | - // \Symfony\Component\Cache\Adapter\MemcachedAdapter::createConnection( |
282 | | - // 'memcached://localhost' |
283 | | - // // the DSN can include config options (pass them as a query string): |
284 | | - // // 'memcached://localhost:11222?retry_timeout=10' |
285 | | - // // 'memcached://localhost:11222?socket_recv_size=1&socket_send_size=2' |
286 | | - // ), |
287 | | - // 'openidFederation', // Namespace, key prefix. |
288 | | - // 60 * 60 * 6, // Default lifetime in seconds (used when particular cache item doesn't define its own lifetime) |
289 | | - //], |
| 271 | +// ModuleConfig::OPTION_PROTOCOL_CACHE_ADAPTER_ARGUMENTS => [ |
| 272 | +// 'openidFederation', // Namespace, subdirectory of main cache directory |
| 273 | +// 60 * 60 * 6, // Default lifetime in seconds (used when particular cache item doesn't define its own lifetime) |
| 274 | +// '/path/to/main/cache/directory' // Must be writable. Can be set to null to use system temporary directory. |
| 275 | +// ], |
| 276 | +// Example for MemcachedAdapter: |
| 277 | +// ModuleConfig::OPTION_PROTOCOL_CACHE_ADAPTER_ARGUMENTS => [ |
| 278 | +// // First argument is a connection instance, so we can use the helper method to create it. In this example a |
| 279 | +// // single server is used. Refer to documentation on how to use multiple servers, and / or to provide other |
| 280 | +// // options. |
| 281 | +// \Symfony\Component\Cache\Adapter\MemcachedAdapter::createConnection( |
| 282 | +// 'memcached://localhost' |
| 283 | +// // the DSN can include config options (pass them as a query string): |
| 284 | +// // 'memcached://localhost:11222?retry_timeout=10' |
| 285 | +// // 'memcached://localhost:11222?socket_recv_size=1&socket_send_size=2' |
| 286 | +// ), |
| 287 | +// 'openidProtocol', // Namespace, key prefix. |
| 288 | +// 60 * 60 * 6, // Default lifetime in seconds (used when particular cache item doesn't define its own lifetime) |
| 289 | +// ], |
290 | 290 |
|
| 291 | + /** |
| 292 | + * Protocol cache duration for particular entities. This is only relevant if protocol cache adapter is set up. |
| 293 | + * For duration format info, check https://www.php.net/manual/en/dateinterval.construct.php. |
| 294 | + */ |
291 | 295 | // Cache duration for user entities (authenticated users data). If not set, cache duration will be the same as |
292 | | - // session duration. This is used to avoid fetching user data from database on every authentication event. |
293 | | - // This is only relevant if protocol cache adapter is set up. For duration format info, check |
294 | | - // https://www.php.net/manual/en/dateinterval.construct.php. |
| 296 | + // session duration. |
295 | 297 | // ModuleConfig::OPTION_PROTOCOL_USER_ENTITY_CACHE_DURATION => 'PT1H', // 1 hour |
296 | | - ModuleConfig::OPTION_PROTOCOL_USER_ENTITY_CACHE_DURATION => null, // fallback to session duration |
| 298 | + ModuleConfig::OPTION_PROTOCOL_USER_ENTITY_CACHE_DURATION => null, // Fallback to session duration |
| 299 | + // Cache duration for client entities, with given default. |
| 300 | + ModuleConfig::OPTION_PROTOCOL_CLIENT_ENTITY_CACHE_DURATION => 'PT10M', // 10 minutes |
297 | 301 |
|
298 | 302 | /** |
299 | 303 | * Cron related options. |
|
0 commit comments