Matt
Matt

Reputation: 71

PHP - Cache arrays saved in included files or not?

Should I use cache to store arrays that are saved in included files? include("filename.php");.. Those included files only have arrays and are about 2 to 5 kilobytes so they are pretty small.

But in term of performance, what is the best? Use cache or simply use include? Just to let you know, I use APC cache.

Thanks for your suggestions!

Upvotes: 0

Views: 222

Answers (1)

Dan Grossman
Dan Grossman

Reputation: 52372

The arrays hardcoded in those PHP files are already cached, both by APC and probably also by your OS file cache. No need to duplicate it somewhere else.

Upvotes: 3

Related Questions