Comments (6)
I just ran into this and it took a surprising amount of head scratching before I realised the per item TTL was to blame. Commenting mostly so I can keep track of this issue.
Originally posted by @Zegnat at zendframework/zend-cache#171 (comment)
from laminas-cache.
@dol @Zegnat It might be fixed in #184 and released yday - can you please check version 2.8.3 and tell me if you still observe the issue?
Thanks!
Originally posted by @michalbundyra at zendframework/zend-cache#171 (comment)
from laminas-cache.
PSR-16
... If the underlying implementation does not support TTL, the user-specified TTL MUST be silently ignored. ...
I have the feeling that what PSR-16 defines here could be very very dangerous:
Here a simple example that will result in a security issue:
function verifyAccessToken($accessToken) {
$accessTokenValidKey = 'access_token_valid_' . md5($accessToken);
if ($cache->get($accessTokenValidKey) !== '1') {
// verify access token by querying authentication server
// if invalid -> return false
// if valid -> authentication server returns expiration ($expiresIn)
$cache->set($accessTokenValidKey, '1', $expiresIn);
}
return true;
}
The Time-to-Live should define the maximum time where this item is considered valid. In caching it normally means that there is a guaranty to be invalidated after that time and this guaranty gets lost here.
Originally posted by @marc-mabe at zendframework/zend-cache#171 (comment)
from laminas-cache.
Closing this as there were no author updates since 06/2018.
from laminas-cache.
@dol If this is still a thing, feel free ping me here so I can re-open the issue.
from laminas-cache.
@boesing Will do. Thank you. Switched programming language and company in the meantime. I leave it here for my former team members.
from laminas-cache.
Related Issues (20)
- Require `mbstring` with v3 HOT 6
- Version 3 should be useable without specific DI container HOT 6
- `Serializer` plugin does not serialize `token` argument for `checkAndSetItem` HOT 1
- PHP 8.1: `SimpleCacheDecorator#convertIterableToArray` converts float to integer array keys HOT 1
- Documentation: Add integration examples for `mezzio` and `laminas-mvc` HOT 10
- Upgrade to PHP 8 does not work because of dependencies requirements HOT 3
- Migration to PHP 8.0 with replace leads to unexpected errors HOT 8
- [RFC]: PSR compatibility via dedicated satellites HOT 1
- [RFC]: remove conflict with symfony/console HOT 5
- Cannot add laminas cache to my project. HOT 3
- PHP 8.1.1 support HOT 6
- A cache storage implementation is required, while the CaptureCache pattern does not require one HOT 2
- CacheItemPoolDecorator does not properly handle multiple unsaved deferred items HOT 3
- RFC: Configure AdapterPluginManager from the config HOT 9
- Use `Clock`-Interface (PSR-20) in `PSR-6` `CacheItem`
- Dependency Dashboard
- psr/cache V3 and psr/simple-cache V3 compatibilities HOT 1
- laminas-cache is still using Laminas\Cache\StorageFactory::factory() which no longer exists HOT 6
- Provide native support for PSR-20 HOT 1
- [RFC]: Detach serializer plugin from `laminas-serializer` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laminas-cache.