I think you misunderstand.

PSR-6 *does* meet some developer needs. PSR-16 is to optimize for a narrower-but-common use case. They complement each other. That's fine.

Neither PSR-6 nor PSR-16 (nor PSR-7 for that matter) have implementations included in the spec or in the Packagist package. That's fine. For basic implementations for which there's no reason for everyone to re-implement them (eg, Null cache), or portions therein, we offer -util packages. It currently doesn't include a null implementation of PSR-6 or PSR-16. Adding one would not be difficult and (speaking as the nominal maintainer of the cache-util package) would be very welcome.

--Larry Garfield

On 12/05/2016 01:12 PM, Устименко Александр wrote:
Larry, this approach is overcomplicated.

NullObject of any interface can be implemented in single simple way.

My PRs in OverComplexCache are still open and I dont' believe it would be merged.

So let complex things will be in complex PSRs and simple ones in simple.

As I understand current PSR/Cache is not meet developers needs, so that we have SimpleCache PSR here.





__________________
Alexander Ustimenko
    +7 (952) 918-02-20

2016-12-06 1:02 GMT+07:00 Larry Garfield <la...@garfieldtech.com <mailto:la...@garfieldtech.com>>:

    We've decided since PSR-3 that such "stock implementations" do not
    belong in the spec, but can live in -util libraries.  A NullCache
    implementation of PSR-6 / PSR-16 would be very welcome for
    cache-util.


    On 12/05/2016 11:47 AM, Alexander Ustimenko wrote:
    Another issue that we have now in current cache and cache-util is
    complete missing of null-object.

    In Psr/Log we have NullLogger, why we can't have NullCache?

    There are situations, when we dont' know 100%, that there or here
    we need cache. Or we know, that we need cache there, but for some
    time we can live without it.

    Cache could be an optional dependency. It's a bitter thought, but
    it's a truth. So I suggest to add to Psr/Simple cache default
    NullCache as just /dev/null or BlackWhole implementation.

    Examples:

      * https://github.com/symfony/cache/blob/master/Adapter/NullAdapter.php
        <https://github.com/symfony/cache/blob/master/Adapter/NullAdapter.php>
      * 
https://github.com/tedious/Stash/blob/master/src/Stash/Driver/BlackHole.php
        
<https://github.com/tedious/Stash/blob/master/src/Stash/Driver/BlackHole.php>

    Same as
    https://github.com/php-fig/log/blob/master/Psr/Log/NullLogger.php
    <https://github.com/php-fig/log/blob/master/Psr/Log/NullLogger.php>



        Use case

    Cache as an optional injectable dependency. When class user not
    provides it -- we take ready NullCache and use it.


    среда, 16 ноября 2016 г., 21:22:20 UTC+7 пользователь Jordi
    Boggiano написал:

        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.md>


        
https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache-meta.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
        <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.
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/0807a451-4055-2645-f77f-2bd668222566%40garfieldtech.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to