クラス WP_Object_Cache::decr()
2015/01/10
WP_Object_Cache::decr()
定義ファイル :/blog/wp-includes/cache.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | public function decr( $key, $offset = 1, $group = 'default' ) { if ( empty( $group ) ) $group = 'default'; if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) $key = $this->blog_prefix . $key; if ( ! $this->_exists( $key, $group ) ) return false; if ( ! is_numeric( $this->cache[ $group ][ $key ] ) ) $this->cache[ $group ][ $key ] = 0; $offset = (int) $offset; $this->cache[ $group ][ $key ] -= $offset; if ( $this->cache[ $group ][ $key ] < 0 ) $this->cache[ $group ][ $key ] = 0; return $this->cache[ $group ][ $key ]; } |