16 lines
430 B
PHP
16 lines
430 B
PHP
<?php
|
|
|
|
// Router de compatibilidad del paquete cache (APCu via SAPI web).
|
|
|
|
use Libs\APCache;
|
|
use Libs\Router;
|
|
|
|
Router::get('/compat/cache/apcache', function () {
|
|
$key = 'compat_' . bin2hex(random_bytes(4));
|
|
$ok = APCache::save($key, 'valor-42', 30) !== false
|
|
&& APCache::get($key) === 'valor-42';
|
|
APCache::delete($key);
|
|
$ok = $ok && APCache::get($key) === false;
|
|
echo $ok ? 'APC_OK' : 'APC_FAIL';
|
|
});
|