Problem/Motivation

This module serializes data that is then sent to cache. Is that a correct assessment.

Would it be worthwhile to use this module in conjunction with Redis to speed up performance.

I know that Redis supplies it's own containers so I am not sure if the two modules are compatible.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

SocialNicheGuru created an issue. See original summary.

mkalkbrenner’s picture

Status: Active » Fixed

We use this module with the redis module. Just declare it in your services.yml:

services:
  cache.backend.redis:
    class: Drupal\redis\Cache\CacheBackendFactory
    arguments: ['@redis.factory', '@cache_tags.invalidator.checksum', '@serialization.igbinary']

Don't use serialization.igbinary_gz because redis already compresses.

socialnicheguru’s picture

Status: Fixed » Needs work

Re-opening because I had another related question.

Another thought, I was looking at these two issues and patches for D9.4.9

Would they be at all helpful to the function of this igbinary module or is this a replacement for

"Make serializer customizable for Cache\DatabaseBackend":"https://www.drupal.org/files/issues/2022-02-09/839444-191.patch" in https://www.drupal.org/project/drupal/issues/839444

" Improve performance of ChainedFast by 90%":"https://www.drupal.org/files/issues/2020-02-20/3014521-11.patch" in https://www.drupal.org/project/drupal/issues/839444

mkalkbrenner’s picture

I use the patch of #839444: Make serializer customizable for Cache\DatabaseBackend on any production side!

services:
  cache.backend.redis:
    class: Drupal\redis\Cache\CacheBackendFactory
    arguments: ['@redis.factory', '@cache_tags.invalidator.checksum', '@serialization.igbinary']

  cache.backend.database:
    class: Drupal\Core\Cache\DatabaseBackendFactory
    arguments: ['@database', '@cache_tags.invalidator.checksum', NULL, '@serialization.igbinary_gz']

  cache.backend.memory:
    class: Drupal\Core\Cache\MemoryBackendFactory
    arguments: ['@serialization.igbinary_gz']

  keyvalue.database:
    class: Drupal\Core\KeyValueStore\KeyValueDatabaseFactory
    arguments: ['@serialization.igbinary_gz', '@database']

  keyvalue.expirable.database:
    class: Drupal\Core\KeyValueStore\KeyValueDatabaseExpirableFactory
    arguments: ['@serialization.igbinary_gz', '@database']
socialnicheguru’s picture

Edit:
I better understand what you did. You created a services.yml file that works for Redis and Igbinary. That is what you included.

-----
Just to confirm. it looks like you modified redis/redis.services.yml.
Did you also keep the redis/example.services.yml as per the redis Readme file?

I am trying to figure out where to pull in the igbinary/igbinary.services.yml and igbinary/example.services.yml.

Please check out this issue and associated patch, Make igbinary usable without needing module enabled. It might be helpful

mkalkbrenner’s picture

"overwriting" services is a core feature. Just put a services.yml in your sites folder.

socialnicheguru’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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

socialnicheguru’s picture

Title: How could this work with redis or memcache? » How could this work with redis,memcache, or filecache?