php - Caching a lot of result pages with APC, is there any downside?
Get the solution ↓↓↓If I use APC for caching a lot of result (html) pages (several hundreds of thousands), is there any downside? Memory size shouldn't be a problem, they are generally short lived, probably 500M max.
Something like:
$page = apc_fetch($_SERVER['QUERY_STRING']);
if ( $page )
{
echo $page;
}
else
{
ob_start();
...
$page = ob_get_clean();
echo $page;
apc_store($_SERVER['QUERY_STRING'], $page, 10);
}
It seems so easy, so there should be a catch here.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: warning: undefined array key
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.