@@ 2615-2629 (lines=15) @@ | ||
2612 | */ |
|
2613 | protected static function _create_cache_key($query, $parameters, $table_name = null, $connection_name = self::DEFAULT_CONNECTION) |
|
2614 | { |
|
2615 | if ( |
|
2616 | isset(static::$_config[$connection_name]['create_cache_key']) === true |
|
2617 | && |
|
2618 | is_callable(static::$_config[$connection_name]['create_cache_key']) === true |
|
2619 | ) { |
|
2620 | return call_user_func_array( |
|
2621 | static::$_config[$connection_name]['create_cache_key'], |
|
2622 | array( |
|
2623 | $query, |
|
2624 | $parameters, |
|
2625 | $table_name, |
|
2626 | $connection_name, |
|
2627 | ) |
|
2628 | ); |
|
2629 | } |
|
2630 | $parameter_string = implode(',', $parameters); |
|
2631 | $key = $query . ':' . $parameter_string; |
|
2632 | ||
@@ 2681-2693 (lines=13) @@ | ||
2678 | // init |
|
2679 | static::$_query_cache = array(); |
|
2680 | ||
2681 | if ( |
|
2682 | isset(static::$_config[$connection_name]['clear_cache']) === true |
|
2683 | && |
|
2684 | is_callable(static::$_config[$connection_name]['clear_cache']) === true |
|
2685 | ) { |
|
2686 | return call_user_func_array( |
|
2687 | static::$_config[$connection_name]['clear_cache'], |
|
2688 | array( |
|
2689 | $table_name, |
|
2690 | $connection_name, |
|
2691 | ) |
|
2692 | ); |
|
2693 | } |
|
2694 | ||
2695 | return false; |
|
2696 | } |