protected static function _variableRouteCacheControl($value)
    {
        // is value in cache index list?
        if (FALSE !== ($index = array_search($value, self::$_variable_route_cache_index))) {
            // if value is tail, do nothing
            if ($index == (count(self::$_variable_route_cache_index) - 1)) {
                return;
            }
            // unset old value
            unset(self::$_variable_route_cache_index[$index]);
            // reset array index
            self::$_variable_route_cache_index = array_values(self::$_variable_route_cache_index);
        } 
        // push value to tail
        array_push(self::$_variable_route_cache_index, $value);
        // cache index list out of range? 
        if (count(self::$_variable_route_cache_index) > self::$_variable_route_cache_limit) {
            // remove head value
            $remove_value = array_shift(self::$_variable_route_cache_index);
            // unset route cache, free memory
            unset(self::$_variable_route_cache[$remove_value]);
        }   
    }
protected static function _variableRouteCacheControl($value)
    {
        // is value in cache index list?
        if (FALSE !== ($index = array_search($value, self::$_variable_route_cache_index))) {
            // if value is tail, do nothing
            if ($index == (count(self::$_variable_route_cache_index) - 1)) {
                return;
            }
            // unset old value
            unset(self::$_variable_route_cache_index[$index]);
            // reset array index
            self::$_variable_route_cache_index = array_values(self::$_variable_route_cache_index);
        } 
        // push value to tail
        array_push(self::$_variable_route_cache_index, $value);
        // cache index list out of range? 
        if (count(self::$_variable_route_cache_index) > self::$_variable_route_cache_limit) {
            // remove head value
            $remove_value = array_shift(self::$_variable_route_cache_index);
            // unset route cache, free memory
            unset(self::$_variable_route_cache[$remove_value]);
        }   
    }
protected static function _variableRouteCacheControl ( $ value ) { // is value in cache index list? if ( FALSE !== ( $ index = array_search ( $ value , self :: $ _variable_route_cache_index ) ) ) { // if value is tail, do nothing if ( $ index == ( count ( self :: $ _variable_route_cache_index ) - 1 ) ) { return ; } // unset old value unset ( self :: $ _variable_route_cache_index [ $ index ] ) ; // reset array index self :: $ _variable_route_cache_index = array_values ( self :: $ _variable_route_cache_index ) ; } // push value to tail array_push ( self :: $ _variable_route_cache_index , $ value ) ; // cache index list out of range?  if ( count ( self :: $ _variable_route_cache_index ) > self :: $ _variable_route_cache_limit ) { // remove head value $ remove_value = array_shift ( self :: $ _variable_route_cache_index ) ; // unset route cache, free memory unset ( self :: $ _variable_route_cache [ $ remove_value ] ) ; } }
To avoid memory leaks, clear variable route cache with LRU when data out of array length.

@param  string  $value
@return void
To avoid memory leaks clear variable route cache with LRU when data out of array length .