Updated: Comment #N

Problem/Motivation

We are still using cache() and cache_invalidate_tags() function all over the place. We need to convert all of these to \Drupal::cache() and Cache::invalidateTags(), respectively. We can then remove cache.inc in #2198339: Remove cache.inc

Proposed resolution

Convert all the things.

Remaining tasks

Passing patch

User interface changes

None

API changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

damiankloip’s picture

FileSize
56.99 KB

Let's see what happens.

Status: Needs review » Needs work

The last submitted patch, 1: 2198343.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
FileSize
57 KB

Didn't rebase local branch.

Status: Needs review » Needs work

The last submitted patch, 3: 2198343-3.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
FileSize
57 KB
644 bytes

Oops, was going to use an array for the callable, then changed my mind, then didn't remove the array :)

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Read through the patch and all looks good, also confirmed that there are no uses of cache() or cache_invalidate_tags() left after applying.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

2198343-5.patch no longer applies.

error: patch failed: core/modules/views/views.module:537
error: core/modules/views/views.module: patch does not apply

longwave’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
57.03 KB

Rerolled.

damiankloip’s picture

Status: Needs review » Reviewed & tested by the community

And back, just a reroll.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

2198343-cache-8.patch no longer applies.

error: patch failed: core/includes/entity.inc:131
error: core/includes/entity.inc: patch does not apply

damiankloip’s picture

Issue tags: -Needs reroll
FileSize
57.03 KB
1.33 KB

Reroll with these conflicts. Got to love patch based workflow.

damiankloip’s picture

Status: Needs work » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed a1a5e15 and pushed to 8.x. Thanks!

Used the new format for deprecated messages.

diff --git a/core/includes/cache.inc b/core/includes/cache.inc
index b78365f..771d4d5 100644
--- a/core/includes/cache.inc
+++ b/core/includes/cache.inc
@@ -25,8 +25,8 @@
  *
  * @see \Drupal\Core\Cache\CacheBackendInterface
  *
- * @deprecated as of 8.x. This will be removed in
- *   https://drupal.org/node/2198339. Use \Drupal::cache() instead.
+ * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
+ *   Use \Drupal::cache().
  */
 function cache($bin = 'cache') {
   return \Drupal::cache($bin);

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.