We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

[SOLVED] I don't want to Phalcon add prefix on my cache keys, does the following code work?

Code:

$front = new Phalcon\Cache\Frontend\Data([]);
$cache = new Phalcon\Cache\Backend\Apc($front, ['prefix' => null]);

or

$cache = new Phalcon\Cache\Backend\Apc($front, ['prefix' => '‘]);

Thanks.

solution:

  1. change phalcon source code
  2. change existing cache management code


29.1k

by default, phalcon add _PHCA before each key, I don't want to add any prefix.



43.9k
Accepted
answer


29.1k

OK, Looks like I need to change the source code, otherwise, I need to change my existing cache management code.