-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Description
At https://github.com/prismicio/php-kit/blob/179a83363ef6c2fa120f5e2c90e5e24045eb776b/src/Prismic/Api.php#L330 the API data is cached for 5 units.
At https://github.com/prismicio/php-kit/blob/179a83363ef6c2fa120f5e2c90e5e24045eb776b/src/Prismic/Cache/CacheInterface.php#L43 the documentation for $ttl doesn't specify what the unit is.
At https://github.com/prismicio/php-kit/blob/179a83363ef6c2fa120f5e2c90e5e24045eb776b/src/Prismic/Cache/DefaultCache.php#L43 the $ttl variable is used as is and passed to apc_store, which interprets it as seconds.
- Please document in the interface that it means seconds, if that is indeed intended, or fix the logic if minutes were intended.
- Is caching the API data for as little as 5 seconds really intended? The request to get the API data is currently taking ~1 second for me on a test repository, and the thought of every five seconds every request until the value is recached taking 1 second longer than usual is unacceptable.
- Whether 5 seconds was intended or not, can you make that a default and have it configurable rather than hardcoded?
(edit: change links to point to source code as it was when ticket was originally opened)
Metadata
Metadata
Assignees
Labels
No labels