Skip to content

[PSR-6] Renamed "pool" to "cache" for better usability, made naming consistent#361

Closed
webmozart wants to merge 1 commit intophp-fig:masterfrom
webmozart:patch-1
Closed

[PSR-6] Renamed "pool" to "cache" for better usability, made naming consistent#361
webmozart wants to merge 1 commit intophp-fig:masterfrom
webmozart:patch-1

Conversation

@webmozart
Copy link
Copy Markdown
Contributor

Hi there!

Thank you @tedivm for explaining the cache approaches on your blog. I like the proposal.

As an outsider of the cache working group, I would like to bring in some unbiased feedback:

  1. The concept of a cache "pool" is great for discussion of various approaches. The end users of the PSR, however, don't need to know what a "pool" is. For them, it is IMO sufficient and easier if the "pool" is simply called "cache".
  2. The item has getKey(), but get(). This is a bit weird - IMO the code becomes easier to read if get() and set() are called getValue() and setValue().
  3. The pool has getItem() and getItems(), but deleteItems() only. I added deleteItem() for the sake of completeness.

I have some more suggestions which require more discussion however. I'll submit them in a separate PR.

Thanks for your hard work! :)

Cheers,
Bernhard

@milesj
Copy link
Copy Markdown

milesj commented Dec 3, 2014

I agree with all these changes. After recently attempting to build a cache layer based on this PSR, I came to the same conclusions.

@Crell
Copy link
Copy Markdown
Contributor

Crell commented Apr 13, 2015

The naming here was discussed at obscene length in the past. The idea of keeping the "pool" in the name was to make it clear that we were talking about a specific pool, bin, etc, not about the cache driver itself. That was a point of confusion before.

(I personally preferred "bin" to "pool", but the consensus on list was to go with pool.)

@dragoonis
Copy link
Copy Markdown
Member

I am happy with the term Pool. If we thought about changing it to Cache I would have no objections.

@Crell Crell changed the title Renamed "pool" to "cache" for better usability, made naming consistent [PSR-6] Renamed "pool" to "cache" for better usability, made naming consistent Apr 26, 2015
@Crell Crell closed this Apr 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants