Marshallers
Marshallers
Using marshallers will allow you to serialize the cache values differently.
SerializableMarshaller
This marshaller will use php's native serialize
and unserialize
functions on the values.
<?php
use SonsOfPHP\Componenet\Cache\Marshaller\SerializableMarshaller;
$marshaller = new SerializableMarshaller();
JsonMarshaller
The json marshaller will use php's native json_encode
and json_decode
functions to serialize data.
<?php
use SonsOfPHP\Componenet\Cache\Marshaller\JsonMarshaller;
$marshaller = new JsonMarshaller();
Custom Marshaller
You can create a custom marshaller. For example, you could create one the encrypts/decrypts the values.
Last updated
Was this helpful?