> Regarding TTL, I don't care much for DateInterval either but I think it
carried over from PSR-6

Yet, it doesn't have to - this can be done once in the adapter, rather than
every implementation doing it internally. Reduces the margin for bugs.

I don't know anyone who's ever used DateInterval, ever. Seems pointless to
burden everyone for an unlikely edge-case? DateInterval seems to have been
created for the sole purpose of parsing that string-format. It has no other
value, as far as I can tell...

I like consistent interfaces, I guess. Overloading is not my thing.


On Fri, Nov 25, 2016 at 2:13 PM, Jordi Boggiano <j.boggi...@seld.be> wrote:

> Regarding decrement below zero.. IMO it goes in the negatives but it was
> brought up at https://github.com/dragoonis/psr-simplecache/issues/2 that
> Memcached doesn't support that for example.
>
> Regarding TTL, I don't care much for DateInterval either but I think it
> carried over from PSR-6, and well yes the code is a bit ugly but then again
> it's 5 lines to have in a given cache implementation so that people can use
> DateInterval if they so wish.. Doesn't seem like a huge cost to keep the
> use case possible?
>
> I'll try and get to your other email (novel? :P) later.
>
> Cheers
>
> On 25/11/2016 14:01, Rasmus Schultz wrote:
>
>> One, and one last minor thing... regarding the DateInterval overload for
>> $ttl in set() ... well ... why?
>>
>> Everyone is going to have to write ugly code to convert these into
>> seconds.
>>
>> Ironically, the answer is first thing that auto-completes on google as
>> soon as you type in "dateinterval", but.... copy/pasting this garbage
>> everywhere, well, why?
>>
>> Being able to specify the TTL as DateInterval is just a clumsy,
>> round-about way to pass an integer argument, is it not?
>>
>>
>> |$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);|
>>
>>
>>
>> On Friday, November 25, 2016 at 1:46:23 PM UTC+1, Rasmus Schultz wrote:
>>
>>     Oh, also - a minor question about the decrement() method. Does it go
>>     into negative when you hit zero, or does it return false, or what?
>>
>>     On Wednesday, November 16, 2016 at 3:22:20 PM UTC+1, Jordi Boggiano
>>     wrote:
>>
>>         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/1cf169c6674764
>> 0c6bc7fb5097d84fbafcd00a0c/proposed/simplecache.md
>>         <https://github.com/php-fig/fig-standards/blob/1cf169c667476
>> 40c6bc7fb5097d84fbafcd00a0c/proposed/simplecache.md>
>>
>>
>>         https://github.com/php-fig/fig-standards/blob/1cf169c6674764
>> 0c6bc7fb5097d84fbafcd00a0c/proposed/simplecache-meta.md
>>         <https://github.com/php-fig/fig-standards/blob/1cf169c667476
>> 40c6bc7fb5097d84fbafcd00a0c/proposed/simplecache-meta.md>
>>
>>
>>
>>         The package containing the interfaces is there:
>>
>>         https://github.com/php-fig/simplecache
>>         <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
>>         <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
>>         <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+unsubscr...@googlegroups.com
>> <mailto:php-fig+unsubscr...@googlegroups.com>.
>> To post to this group, send email to php-fig@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-417
>> 6-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/to
> pic/php-fig/kSj_yVbkwOw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> php-fig+unsubscr...@googlegroups.com.
> To post to this group, send email to php-fig@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/php-fig/4aed6d6e-192e-eea5-6744-a64a19383507%40seld.be.
>
> For more options, visit 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+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CADqTB_iz-sat%2ButwimVz7XYUV%2BeQ3bkW9DsW5aJnV4ALn2eCnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to