Welcome Guest, Not a member yet? Register   Sign In
APC or memcache?
#1

[eluser]William Rufino[/eluser]
Hi everyone,

Should I use APC or memcache to cache large data?

Thanks!
#2

[eluser]eoinmcg[/eluser]
you can find a nice summary here:
http://stackoverflow.com/questions/81504...d-i-choose
#3

[eluser]William Rufino[/eluser]
Yeah i already found that link!

now i still have a question about memcache...

Is it based on a global scope, or a session scope?


If i keep my "user" object on cache, it will be available for this session, or i would have to name it "user1" "user2" for each session that logs in?
#4

[eluser]Twisted1919[/eluser]
"user" will be stored on memcached server, therefore, next time when you write user, it will overwrite the previous record so if you want to save your users data, you need to have independent records, like user-USERID, then retrieve it with get('user-'.$user_id) or something similar.
#5

[eluser]William Rufino[/eluser]
yeah! thats my question! thx Smile
#6

[eluser]William Rufino[/eluser]
one thing that would be nice to implement is an integration between the cache driver and the active record class!
#7

[eluser]William Rufino[/eluser]
I'm having trouble with the memcached :/

when i try to save info to it, it returns false, if i change to apc, it works perfectly! (my memcached server is running just fine!)
#8

[eluser]Twisted1919[/eluser]
you are aware that you need to connect to your memcached server before you can get/set data, right ?
#9

[eluser]William Rufino[/eluser]
of couse i am, but the library does that too.
i'm using the new cache driver.




Theme © iAndrew 2016 - Forum software by © MyBB