Skip to content

Improve data serializers. #83

Description

@ndobromirov

Steps to reproduce

An old issue against memcache integration module for Drulpal 7 was completed.
(https://www.drupal.org/node/2696129).

There is work in D8 to have this as a pluggable system, and some modules are already using that like this.

Expected behavior

Have the LCache library be as fast and optimal as possible.

Actual behavior

It uses the standard PHP serializer utilities hardcoded in L2, maybe used in L1 (if memcache / Redis), even though there are better implementations as alternative and compatible extensions - like igbinary.

Porposed solution

Add a serialiser utility layer that can abstract that away, so we can have the fastest possible serialization/unserialization plus minimalistic storage requirements that will allow switching at any future point (with the cost of cache flush).

We can provide only 1 serializer - the standard one and an interface to comply with for any other plug-in, but the API should allow to inject a compatible custom one at any moment (if needed).

Frameworks tested

  • Using lcache/lcache directly
  • Drupal 8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions