Skip to content

Conversation

@tPl0ch
Copy link
Collaborator

@tPl0ch tPl0ch commented Oct 26, 2017

This is needed because when running serializers the cost of hashing the schemas' string representations is way less than going to the registry over HTTP.

This adds 3 new methods to the CacheAdapter API:

cacheSchemaIdByHash(int $schemaId, string $schemaHash)
getIdWithHash(string $hash)
hasSchemaIdForHash(string $schemaHash)

Unfortunately this is a BC breaking change which requires clients that possibly have own implementations of the CacheAdapterInterface to implement those 3 methods.

Clients that use the default shipped adapters are OK.

This is needed because when running serializers the cost of hashing the
schemas' string representations is way less than going to the registry
over HTTP.

This adds 3 new methods to the `CacheAdapter` API:

`cacheSchemaIdByHash(int $schemaId, string $schemaHash)`
`getIdWithHash(string $hash)`
`hasSchemaIdForHash(string $schemaHash)`

Unfortunately this is a BC breaking change which requires clients that
possibly have own implementations of the `CacheAdapterInterface` to
implement those 3 methods.

Clients that use the default shipped adapters are OK.
@tPl0ch tPl0ch merged commit ebf27bd into master Oct 26, 2017
@tPl0ch tPl0ch deleted the feature-cache-adapter-hash branch September 3, 2018 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants