klein / klein.php

A fast & flexible router
MIT License
2.66k stars 290 forks source link

Support apcu without apcu_bc? #403

Open TysonAndre opened 4 years ago

TysonAndre commented 4 years ago

Several references to apc are found, but not apcu. https://pecl.php.net/apcu_bc is helpful for the shared memory caching to work in php 7.

Expected: Check for apcu_fetch, apcu_store in addition to apc_fetch, apc_store. Possibly also suggest the apcu/apc module in composer.json

e.g. these references were seen:

src/Klein/Klein.php
440:        $apc = function_exists('apc_fetch');
556:                            $regex = apc_fetch("route:$expression");
559:                                apc_store("route:$expression", $regex);