Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1352 Add Flush for Cache #1395

Merged
merged 15 commits into from
Oct 22, 2013
Prev Previous commit
Next Next commit
Updated
  • Loading branch information
dreamsxin committed Oct 18, 2013
commit f555875a8691deed306dac0718f8830e6f411e95
4 changes: 2 additions & 2 deletions ext/cache/backend/apc.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,14 +559,14 @@ PHP_METHOD(Phalcon_Cache_Backend_Apc, flush){
ZVAL_STRINGL(key, str_key + 5, str_key_len - 5 - 1, 1);
efree(str_key);

phalcon_return_call_func_p1("apc_delete", key);
phalcon_call_func_p1_noret("apc_delete", key);
}
#else
PHALCON_INIT_NVAR(itkey);
it->funcs->get_current_key(it, itkey TSRMLS_CC);
if (likely(Z_TYPE_P(itkey) == IS_STRING)) {
ZVAL_STRINGL(key, Z_STRVAL_P(itkey) + 5, Z_STRLEN_P(itkey) - 5, 1);
phalcon_return_call_func_p1("apc_delete", key);
phalcon_call_func_p1_noret("apc_delete", key);
}
#endif

Expand Down
4 changes: 1 addition & 3 deletions ext/cache/backend/libmemcached.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,11 +649,9 @@ PHP_METHOD(Phalcon_Cache_Backend_Libmemcached, flush){

PHALCON_INIT_NVAR(real_key);
ZVAL_STRINGL(real_key, Z_STRVAL(key), Z_STRLEN(key), 1);
phalcon_array_append(&return_value, real_key, 0);

phalcon_array_unset(&keys, real_key, 0);

phalcon_return_call_method_p1(memcache, "delete", real_key);
phalcon_call_method_p1_noret(memcache, "delete", real_key);
}

phalcon_call_method_p2_noret(memcache, "set", special_key, keys);
Expand Down
3 changes: 1 addition & 2 deletions ext/cache/backend/memcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,7 @@ PHP_METHOD(Phalcon_Cache_Backend_Memcache, flush){
PHALCON_INIT_NVAR(real_key);
ZVAL_STRINGL(real_key, Z_STRVAL(key), Z_STRLEN(key), 1);

phalcon_array_unset(&keys, real_key, 0);

phalcon_array_unset(&keys, real_key, 0);
phalcon_call_method_p1_noret(memcache, "delete", real_key);
}

Expand Down