I'm planing to add APC or MEMCACHED to my PHP code ! my question is does it require to rewrite all the code ? as i looked in to PHP Manual and there i got this !
function get_foo(foo_id)
foo = memcached_get("foo:" . foo_id)
return foo if defined foo
foo = fetch_foo_from_database(foo_id)
memcached_set("foo:" . foo_id, foo)
return foo
end
So, for storing the variable i need to do memcached_set(...) or it's like that i add the plugin and get the performance boost !
I have no idea on APC / Memcache, so any discussion on this is welcome