Skip to content
Snippets Groups Projects
user avatar
Project-Update-bot authored
0e4dec5a
History
--------------------------------------------------------------------------------
  serialization_cache module Readme
  http://drupal.org/project/serialization_cache
--------------------------------------------------------------------------------

Contents:
=========
1. ABOUT
2. INSTALLATION
3. CREDITS

1. ABOUT
========

Drupal 8 serialization system is pretty flexible but it causes serious time cost
to recursively process all entities, their fields, embed entities if they are
exist and etc.
This module provides caching for normalized entities (+embedded entities)
using different caches for different accesses (checking "view" for entity and
its fields).

2. INSTALLATION
===============

First step: install as usual, see https://www.drupal.org/node/1897420 for
further information.

Second step: you need to override your current "serializer" service with the
AccessCachingSerializer. This module already does it.
Alternatively you can do it like so in your own module:

class YourModuleServiceProvider implements ServiceModifierInterface {
  public function alter(ContainerBuilder $container) {
    if ($container->hasDefinition('serializer')) {
      $container->getDefinition('serializer')->setClass(AccessCachingSerializer::class);
    }
  }
}

4. CREDITS
==========

Project page: http://drupal.org/project/serialization_cache