Current version of memcache invlidation is using set within expire change.

 public function invalidateMultiple(array $cids) {
    foreach ($cids as $cid) {
      if ($item = $this->get($cid)) {
        $item->expire = REQUEST_TIME - 1;
        $this->memcache->set($this->key($cid), $item);
      }
    }
  }

Shouldn't be a delete?

Asking due to a problem we are facing with memcache enormous size growth.

Comments

cr0ss created an issue.

misc’s picture

From my point of view - I think it said in the comment for the function why it is like this:

   * Invalid items may be returned in later calls to get(), if the
   * $allow_invalid argument is TRUE.

Marked as invalid, but could still be used, if it's not renewed - so you still could use the cache - even if it's invalid.

I think it's not related to that your size growth of Memcached.