send normalized keys to the cache backends so they do not need to man… - #22215
Conversation
There was a problem hiding this comment.
cleaning this up ... passes amount but it is not being used ...
|
@kaspth another one ... this did not get assigned to anyone ... |
|
API changes break any non-core cache store subclasses that override or call these methods. |
|
so leave the method as namespaced_key so nobody that calls super gets hurt ? |
|
And the callers of any of the methods that now require a namespaced/normalized key argument. |
|
Only private methods were changes, so this would only affect On Mon, Nov 9, 2015 at 8:51 PM, Jeremy Daer notifications@github.com
|
|
The consumers of these API are other cache store subclasses. They call or super() to these boilerplate methods. |
|
so they would still work fine when renamed to normalize_parameters, right ? |
|
I added an alias for the old method, so there should be no fallout ... good to go ? |
…age this themselves
2dbefd8 to
282be24
Compare
|
rebased @jeremy looking good ? |
282be24 to
f6bc5ac
Compare
|
@rafaelfranca got 2 cents on that ? |
|
@jeremy / @kaspth / @rafaelfranca ok to merge this ? |
|
The API is being maintained by the alias so I think it is good. Thanks |
send normalized keys to the cache backends so they do not need to man…
There was a problem hiding this comment.
This doesn't cover backwards compatibility. The file and mem cache stores changes break user written subclasses.
There was a problem hiding this comment.
user written subclasses of stores, not Cache itself, right ?
|
Missed the conversation going on in #22205 (comment). Backing off 🤘 |
add deprecations for a smooth transition after #22215
…age this themselves
key manipulation is a recurring pattern in the cache stores (base + file + mem_cached) which makes the code less readable and mixes concerns
this moves all the key manipulation into a single method normalize_key and reuses that, which will also enable users to inherit or share logic better via modules since they no longer have to modify the key (escape_key or key_file_path or namespaced_key)