The key-value store accepts any serializable value. If a value is not
serializable, a {@link SerializationFailedException} is thrown.
Additionally, implementations may put further restrictions on their
accepted values. If an unsupported value is passed, an
{@link UnsupportedValueException} is thrown. Check the documentation of
the implementation to learn more about its supported values.
Any integer or string value is accepted as key. If any other type is
passed for the key, an {@link InvalidKeyException} is thrown. You should
make sure that you only pass valid keys to the store.
If the backend of the store cannot be written, a {@link WriteException}
is thrown. You should always handle this exception in your code:
php
try {
$store->set($key, $value);
} catch (WriteException $e) {
write failed
}