New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #879: Add PSR-16 simple cache #14622

Merged
merged 25 commits into from Aug 29, 2017

Conversation

@klimov-paul
Member

klimov-paul commented Aug 9, 2017

Add PSR-16 simple cache
https://github.com/php-fig/simple-cache

Q A
Is bugfix? no
New feature? yes
Breaks BC? yes
Tests pass? yes
Fixed issues #879
@klimov-paul

This comment has been minimized.

Show comment
Hide comment
@klimov-paul

klimov-paul Aug 11, 2017

Member

Complete.

However, there are some questions, which should be decided:

  1. Should we keep suport for non-string keys at the yii\caching\CacheInterface?
    They are widely used in framework code, while technically contradict PSR-16. Also note that methods like getMultiple() and setMultiple() does not support non-scalar keys even now.

  2. Should be keep add*() methods?
    These methods were added to support race-condition-avoid operations provided by some cache storages. However making solution PSR-compatible it is no longer possible to use low-level cache storage methods for that.

Member

klimov-paul commented Aug 11, 2017

Complete.

However, there are some questions, which should be decided:

  1. Should we keep suport for non-string keys at the yii\caching\CacheInterface?
    They are widely used in framework code, while technically contradict PSR-16. Also note that methods like getMultiple() and setMultiple() does not support non-scalar keys even now.

  2. Should be keep add*() methods?
    These methods were added to support race-condition-avoid operations provided by some cache storages. However making solution PSR-compatible it is no longer possible to use low-level cache storage methods for that.

@samdark samdark requested review from dynasource, cebe, SilverFire and arogachev Aug 27, 2017

@dynasource

It seems ok already. Quite some work you pulled off. Well done.

@samdark

This comment has been minimized.

Show comment
Hide comment
@samdark

samdark Aug 29, 2017

Member

I need to fix the build first :)

Member

samdark commented Aug 29, 2017

I need to fix the build first :)

@klimov-paul

This comment has been minimized.

Show comment
Hide comment
@klimov-paul

klimov-paul Aug 29, 2017

Member

Build fixed

Member

klimov-paul commented Aug 29, 2017

Build fixed

@samdark samdark merged commit 4d9204d into yiisoft:2.1 Aug 29, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@samdark

This comment has been minimized.

Show comment
Hide comment
@samdark

samdark Aug 29, 2017

Member

Merged. Thank you for taking care of it.

Member

samdark commented Aug 29, 2017

Merged. Thank you for taking care of it.

@klimov-paul klimov-paul deleted the klimov-paul:879-psr-cache branch Jan 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment