Closed githubjeka closed 8 years ago
However ApcCache, ArrayCache, XCache and WinCache support saving arrays and even objects without serialization.
The only thing that seems right to me:
string
to mixed
in methods of classes, where the caching $value
can be something different from stringinit()
method in classes where serializer
must not be false
in order to prevent wrong behaviorAnd what about Redis/DbError errors?
Technically we can introduce exceptions for the case but since cache should be as fast as possible and these extra checks could slow it down, I'm not sure if these checks are worth adding.
Agreed with @samdark
@githubjeka Would you like to submit a PR with PHPDoc updates?
Ready,
If serializer of cache is off then value for cache is array.
It's wrong for value of Cache::setValue()