public Builder<T> useSerializerInRam(
        int maxRamSizeBytes, CacheSerializer<T> serializer
    ) {
        this.ramMode = DualCacheRamMode.ENABLE_WITH_SPECIFIC_SERIALIZER;
        this.maxRamSizeBytes = maxRamSizeBytes;
        this.ramSerializer = serializer;
        return this;
    }
public Builder < T > useSerializerInRam ( int maxRamSizeBytes , CacheSerializer < T > serializer ) { this . ramMode = DualCacheRamMode . ENABLE_WITH_SPECIFIC_SERIALIZER ; this . maxRamSizeBytes = maxRamSizeBytes ; this . ramSerializer = serializer ; return this ; }
Use Json serialization/deserialization to store and retrieve object from ram cache.

@param maxRamSizeBytes is the max amount of ram in bytes which can be used by the ram cache.
@param serializer      is the cache interface which provide serialization/deserialization
methods
for the ram cache layer.
@return the builder.