This was also carried over from PSR-6 where Pool::save() returns bool.
I am not really sure what's best here, I expect most implementation will
throw anyway if they can't connect to the cache, and in other instances
there is no reason a write should fail AFAIK.
Any other opinions on this?
--
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 php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAFojS1sV1YTy5A-rjqq5syGPMbVAcBn1WA-D62BDsgV0yVp3wg%40mail.gmail.com.
an email to php-fig+unsubscribe@googlegroups.com
<mailto:php-fig+unsubscribe@googlegroups.com>.
To post to this group, send email to php...@googlegroups.com
<mailto:php-fig@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/0c6b40bb-ae5a-4bd3-83f0-f617c8d0d4aa%40googlegroups.com
<https://groups.google.com/d/msgid/php-fig/0c6b40bb-ae5a-4bd3-83f0-f617c8d0d4aa%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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 php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/e7ad073d-7335-07db-3b79-9a5e4b566523%40seld.be.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAOWwgpnmDEvx6%3DZNC6QVi8-ODVHmOkoXj3mpCf1uO6m81Xd0HQ%40mail.gmail.com.
$seconds = ($delta->s)
+ ($delta->i * 60)
+ ($delta->h * 60 * 60)
+ ($delta->d * 60 * 60 * 24)
+ ($delta->m * 60 * 60 * 24 * 30)
+ ($delta->y * 60 * 60 * 24 * 365);
an email to php-fig+unsubscribe@googlegroups.com
<mailto:php-fig+unsubscribe@googlegroups.com>.
To post to this group, send email to php...@googlegroups.com
<mailto:php-fig@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/4d133796-3988-4176-94dc-8ce53f034c0d%40googlegroups.com
<https://groups.google.com/d/msgid/php-fig/4d133796-3988-4176-94dc-8ce53f034c0d%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Jordi Boggiano
@seldaek - http://seld.be
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/4aed6d6e-192e-eea5-6744-a64a19383507%40seld.be.
Regarding TTL, I don't care much for DateInterval either but I think it carried over from PSR-6
Thanks to everyone involved!
Nicolas
- doesn't say what happens when $key is invalid. I guess the same exception as PSR-6. Should be written?
Heya,
We believe PSR-16, Simple Cache, is now ready for final review. As
coordinator, I hereby open the mandatory review period prior to a formal
acceptance vote; voting will begin no earlier than December 1st, 2016.
Here are links to the most current version and its meta document:
https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache.md
https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache-meta.md
The package containing the interfaces is there:
https://github.com/php-fig/simplecache
The latest important changes to the interfaces can be found at:
https://github.com/php-fig/simplecache/releases/tag/0.2.0
And FWIW, Scrapbook already provides a PSR-16 implementation in its upcoming release: https://github.com/matthiasmullie/scrapbook/blob/master/src/Psr16/SimpleCache.php
Thanks for your time reviewing!
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 php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/c0e7d147-e0b2-406f-d750-1a52120b0b59%40seld.be.
IMO this kinda goes in the simplicity category, which is why I still think enforcing an array return value vs a traversable would also be simpler.
- returning `array` for `getMultiple` is not consistent with PSR-6
`getItems` which returns `array|Traversable`
See 2 points above. I think array only would be best. If it's wrapping a PSR-6 pool it can just normalize that with iterator_to_array()
- what should happen when $key already exists in the storage but is not
"incrementable/integer"? (Redis INCR fails, I didn't check apcu) =>
return false? throw? erase and store $step? other?
That's a backend error which is usually suppressed as if there was a cache miss, but here people are going to expect a number back so not sure if returning false is great (c.f strpos-style common mistakes..). It is a kind of misuse so maybe throwing here is better?
couldn't all these new interfaces move in the Psr\Cache namespace (thus releasing them as psr/cache 1.1 on packagist?)
That's an interesting idea, but also kinda confusing for users because Psr\Cache would suddenly contain a Psr\Cache\Cache which sounds like the thing to use, but also the Pool.. So maybe best to just duplicate the InvalidArgumentException/CacheException into SimpleCache namespace.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/aa6d9626-a60e-74dc-5712-421779f0c021%40seld.be.
> As I understand what you said, PSR-16 represents a cache server, and flush() would wipe everything on there.
I find this answer highly problematic, because that means that there is *no* concept to support back-ends that can (efficiently or not) support multiple collections.
A server-abstraction *precludes* implementations that support multiple collections - a clear() method, by definition, would clear the contents of the *server*.
Compare this with a collection-abstraction, where a clear() method, by definition, clears the contents of the *collection*.
The latter does *not* prevent you from having a collection that happens to be a server.
The former *does* prevent you from having a server that supports multiple collections, which just isn't the reality we have.
Thanks for the answer Jordi,
I fine with your answers! Just a few notes:
IMO this kinda goes in the simplicity category, which is why I still think enforcing an array return value vs a traversable would also be simpler.
Understood.
Then I'd like to suggest to add a second `$default = null` argument to getMultiple(). That would be consistent with get(), and allow detecting cache misses if really required, by e.g. providing an object there and check the resulting values identities.
- returning `array` for `getMultiple` is not consistent with PSR-6
`getItems` which returns `array|Traversable`
See 2 points above. I think array only would be best. If it's wrapping a PSR-6 pool it can just normalize that with iterator_to_array()
No strong opinion on this on my side.
> PSR-6 used the "pool" concept rather than "server" specifically for this reason; each "pool" is a separate logical namespace independent of any other pool, and two pool objects should not interact. They could both be backed by a file system (separate directories), or by the same SQL database connection (separate tables), or entirely separate Redis servers, or the same Redis server with automatic prefixing... that's all an implementation detail. At a logical level they're independent collections.
Yeah, this perfectly summarizes what I managed to put in way too many words. Thanks, Larry :-)
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/f910ab9a-ed94-e66d-8f69-08b816d130e9%40garfieldtech.com.
We're already very committed to PSR-16 at work, so I should be able to squeeze that in - will see about getting that done in the morning :-)
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/572634c1-1c9a-f716-c801-ef5817a0fc6d%40seld.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 php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CADqTB_jOkXiN1UdLL-WFigPUeVhfN1xOuWUPMPQ-gXE%2BbiAB%3DA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAKxcST-XUoHOeC%2B1-PdRqqAMdwQKZNycyJMzUk4ML%3DKcK61JSw%40mail.gmail.com.
On Nov 27, 2016 10:13 PM, Paul Dragoonis <drag...@gmail.com> wrote:
> The typehint array|Traversable will remain on all existing methods. This allows for an extensible implementation around this PSR. This also happens to align with PSR-6 which is a bonus.
The return types only, right? Passing in a traversable of array keys to getMultiple makes little sense to me, and is out of alignment with PSR-6.
Otherwise these changes all sound good to me. Thanks!
--Larry Garfield
couldn't all these new interfaces move in the Psr\Cache namespace (thus releasing them as psr/cache 1.1 on packagist?)
That's an interesting idea, but also kinda confusing for users because Psr\Cache would suddenly contain a Psr\Cache\Cache which sounds like the thing to use, but also the Pool.. So maybe best to just duplicate the InvalidArgumentException/CacheException into SimpleCache namespace.May I suggest to name it Psr\Cache\SimpleCacheInterface (and release it as psr/cache 1.1?)This would make the most sense to me.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/13388408-c187-2738-7940-1084f473be5b%40seld.be.
To post to this group, send email to php...@googlegroups.com
<mailto:php-fig@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/13388408-c187-2738-7940-1084f473be5b%40seld.be
<https://groups.google.com/d/msgid/php-fig/13388408-c187-2738-7940-1084f473be5b%40seld.be>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
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 php-fig+unsubscribe@googlegroups.com
<mailto:php-fig+unsubscribe@googlegroups.com>.
To post to this group, send email to php...@googlegroups.com
<mailto:php-fig@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/CADqTB_gx8bysGMiQ5uep7jWE4XS8rCiz9%2BjhypjKWqOPJurZ5A%40mail.gmail.com
<https://groups.google.com/d/msgid/php-fig/CADqTB_gx8bysGMiQ5uep7jWE4XS8rCiz9%2BjhypjKWqOPJurZ5A%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Jordi Boggiano
@seldaek - http://seld.be
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/0b5cb48a-48c9-c8a9-c178-7eafe8c16d78%40seld.be.
Yes PSR-16 is meant to live alongside PSR-6, so it has to be reasonably compatible and yes a bridge has been done (https://github.com/php-fig/simplecache/commit/13f43ba7f6d5ce37c6c115c26a5f653c2d9c1e18).
yes a bridge has been done
(https://github.com/php-fig/simplecache/commit/13f43ba7f6d5ce37c6c115c26a5f653c2d9c1e18).
--
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 php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/0cf7897f-1334-a7fd-21fb-5bed0e926024%40garfieldtech.com.
--
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 php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/1480589693.3635659.804857481.18B5A0BA%40webmail.messagingengine.com.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/1480589693.3635659.804857481.18B5A0BA%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAKiSzdBay56qvL8W%3DSCOgyW9uUR9WXBKn-4T7TpnzjknJbYH4A%40mail.gmail.com.
> why are we talking about pools in a spec which deliberately doesn't define them? It's out of scope.I'd say it's the other way around - the PSR-16 cache-abstraction represents a logical collection.The definition, in my opinion, is perfect - if we don't define what it is, people might assume that the abstraction is a server, in which case they need to concern themselves with key-collisions, accidentally clearing another consumer's cache-entries, and so on.The goal being simplicity, the abstraction needs to be defined explicitly as being a logical collection, meaning you don't have to worry about key-collisions and such.A consumer should be able to assume that the cache instance provided to it is intended for it's own use.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/1480589693.3635659.804857481.18B5A0BA%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAKiSzdBay56qvL8W%3DSCOgyW9uUR9WXBKn-4T7TpnzjknJbYH4A%40mail.gmail.com.
--
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 php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CADqTB_jqu%3DKFj9e2zk-g0TNT_9n1AWPrFNTtB2fF%3DdswjqOOPQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/1480589693.3635659.804857481.18B5A0BA%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAKiSzdBay56qvL8W%3DSCOgyW9uUR9WXBKn-4T7TpnzjknJbYH4A%40mail.gmail.com.--
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 php-fig+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CADqTB_jqu%3DKFj9e2zk-g0TNT_9n1AWPrFNTtB2fF%3DdswjqOOPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAKiSzdBb9q4XgBmfK25OgvbpfXOewEzJOYhvYxhgUQ1c-k07kA%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/1480589693.3635659.804857481.18B5A0BA%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAKiSzdBay56qvL8W%3DSCOgyW9uUR9WXBKn-4T7TpnzjknJbYH4A%40mail.gmail.com.--
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 php-fig+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CADqTB_jqu%3DKFj9e2zk-g0TNT_9n1AWPrFNTtB2fF%3DdswjqOOPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAKiSzdBb9q4XgBmfK25OgvbpfXOewEzJOYhvYxhgUQ1c-k07kA%40mail.gmail.com.
Cheers for the feedback everyone. I will sit down with Jordi as soon as we're both available (tonight?), to go through everything. Speak soon.
On 27 Nov 2016 14:28, "Jordi Boggiano" <j.bog...@seld.be> wrote:
>
> I'll try to address all formatting/wording stuff in a unified PR later, thanks.
>
>
> On 26/11/2016 15:38, Larry Garfield wrote:
>>
>> * getMultiple() accepts array|Traversble, but returns an array. I would
>> have expected the other way around; accept an array of short strings,
>> return a traversable of "stuff".
>
>
> See my reply to Nicolas Grekas about this, I'd be curious to hear your thoughts there, to keep it in the same thread.
>
>
>> * For increment/decrement, returning "value or false" is an
>> anti-pattern. It's a PHP language anti-pattern, but still an
>> anti-pattern. Don't do that. If something breaks, throw an exception
>> because the data is now invalid anyway.
>
>
> I'd tend to agree there, as I just replied to Nicolas as well.
>
>
>> * And the only major point: I do not think the CounterInterface belongs
>> here. There's plenty of use cases for an atomic counter that are not
>> part of a cache; remember a cache could get wiped at any time and the
>> application must continue to function. Sometimes wiping a counter is
>> OK, other times it's totally not. That a cache is used for that is an
>> implementation detail.
>>
>> I would instead recommend splitting CounterInterface off to its own
>> (small) PSR. I have no problem with small PSRs if they cover their
>> target case adequately. Someone could certainly then implement both
>> CounterInterface and SimpleCache\CacheInterface (or CounterInterface and
>> CacheItemPoolInterface if they were so inclined) and lose nothing; or
>> they could implement it on a persistent backend of some sort.
>
>
> Yup.. I think this might be a good thing indeed. Curious to hear from Paul on this one but I'd tend to +1.
>
>
> 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 php-fig+u...@googlegroups.com.
> To post to this group, send email to php...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/36fad92d-e512-8980-9d82-9c43faa1c4eb%40seld.be.
Heya,
We believe PSR-16, Simple Cache, is now ready for final review. As
coordinator, I hereby open the mandatory review period prior to a formal
acceptance vote; voting will begin no earlier than December 1st, 2016.
Here are links to the most current version and its meta document:
https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache.md
https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache-meta.md
The package containing the interfaces is there:
https://github.com/php-fig/simplecache
The latest important changes to the interfaces can be found at:
https://github.com/php-fig/simplecache/releases/tag/0.2.0
And FWIW, Scrapbook already provides a PSR-16 implementation in its
upcoming release:
https://github.com/matthiasmullie/scrapbook/blob/master/src/Psr16/SimpleCache.php
Thanks for your time reviewing!
Examples:
Same as https://github.com/php-fig/log/blob/master/Psr/Log/NullLogger.php
Cache as an optional injectable dependency. When class user not provides it -- we take ready NullCache and use it.
--
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 php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/b67406ac-5227-456d-a7c3-f65523bf527d%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/b67406ac-5227-456d-a7c3-f65523bf527d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/614af58c-322c-2620-7a49-51e9eac15cb4%40garfieldtech.com.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/7289d19d-5f4a-47a1-bd0b-437326bc2de5%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/kSj_yVbkwOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/c5c2a162-2b04-4a70-a5d4-966099831940%40googlegroups.com.
class UnknownUser implements User {…} // Null Object Class, providing proper avatar etc.
$unknownUser = new UnknownUser(); // N.B. $unknownUser is created only once, but can be reused multiple times
// somewhere:
$user = $userCache->get('name of deleted user', $unknownUser);
$view->render('comment.html', ['user' => $user, …]);