Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated: Comment #N
Problem/Motivation
We still have views_cache_get and views_cache_set functions in views.module. This is only used on displayPluginBase class, once each.
Proposed resolution
Move any logic we need to into displayPluginBase::initDisplay. Remove the mentioned methods above.
Remaining tasks
Do it.
User interface changes
None.
API changes
None really, no one really has uses for views cache methods. This is something that was internal to views.
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff-2140051-5.txt | 2.86 KB | damiankloip |
#5 | 2140051-5.patch | 5.81 KB | damiankloip |
Comments
Comment #2
damiankloip CreditAttribution: damiankloip commentedThat unit test needs adapting.
Comment #3
dawehnerNice work!
It feels wrong to still have static functions but I agree that this is out of scope here.
You can also use the languageManager service as alternative to this function call.
Can we replace that with \Drupal::cache() right now?
Comment #4
olli CreditAttribution: olli commentedThis looks like it could be replaced with $this->getConfigFactoryStub().
Comment #5
damiankloip CreditAttribution: damiankloip commentedYou mean a static variable I guess? :)
Good point olli! I can totally use that!
Made the other changes too.
Comment #6
dawehnerolli++ seriously, great catch!
Comment #7
dawehnerWonderful!
Comment #8
webchickSeems like this is pretty self-contained, so should be safe to commit.
Committed and pushed to 8.x. Thanks!
I guess this doesn't need a change notice if it's internal to views?