On 23/11/2016 17:08, Matteo Beccati wrote:
Tbh I was a bit surprised as I haven't seen any discussion about it at
all after the entrance vote and I wasn't aware of it being worked on
anywhere outside this ML. My fault, as I've probably missed that
communication and didn't check or ask around.

A few people have came forward with feedback here and there and we took it where we could, but overall as this thread shows people only have nitpicky gripes (no offense meant to anyone, details matter) and are otherwise ok with the spec I think.

I understand where "MUST treat an item as expired once its Expiration
Time is reached" comes from, and I would agree, but for a cache it makes
little sense to be so strict and adamant about it. An entry that has a
TTL of 30 seconds is probably going to be fine at 31s too, especially if
expiration can't be expressed as a point in time.

Relaxing that would allow implementations to conform to the PSR-6
interface and adding stampede protection the same way apc(u) / squid do,
i.e. returning a slightly stale item while a single process is updating
the cache.
>
> Not a deal-breaker, but "SHOULD treat an item as expired" can be
> implemented as "always treat..." if anyone so desires, whereas the
> opposite is not possible.

I am a believer in pragmatism and given that I'd say an implementation that does this even if it violates the spec is totally fine as long as the user chooses it willingly and they know what it means then whatever. I don't think SHOULD or MUST will change a whole lot in practice there, but I also don't really have anything against changing it.. Anyone else got something to add?

Alternatively, I'd suggest adding something like
CacheInterface::setDefaultTTL() and CacheInterface::TTL_NEVER = -1, with
support for the latter being subject to the actual storage capabilities.

I am rather against setDefaultTTL because that'd mean every lib and user has to constantly reset the default TTL to make sure they have the right one set, so you might as well just set the TTL you want.

TTL_NEVER however sounds like a good addition, I'd be curious to hear other people on this.

Cheers

--
Jordi Boggiano
@seldaek - http://seld.be

--
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/c210a88c-c754-7c7c-46dc-161396a31863%40seld.be.
For more options, visit https://groups.google.com/d/optout.

Reply via email to