The expression return apcu_store($key, $value, (int)$ttl) could return the type array which is incompatible with the type-hinted return boolean. Consider adding an additional type-check to rule them out.
The expression return apcu_exists($key) also could return the type string[] which is incompatible with the return type mandated by Psr\SimpleCache\CacheInterface::has() of boolean.