On Apr 17, 2008, at 9:04 AM, mike wrote:
On 4/17/08, Peter J. Holzer <[EMAIL PROTECTED]> wrote:
Use a unix domain socket and set the permissions accordingly.
duh, didn't think about suggesting that. however, having a local
socket doesn't make sense if this is supposed to be *distributed* -
use APC (in PHP) or some other local caching mechanism if you don't
plan on distributing it!
But in that case I'd use a different scheme: Tell your users to
choose a
hard to guess prefix (for example, 16 random letters or digits) for
their keys. This will ensure that users cannot read or modify each
other's data unless they are told or can guess the prefix.
thats originally how i was going to do it, except people can wreak
havoc by issuing flush_all and such. depending on how many people use
it, it could wreck the whole point of having the cache there...
memcached also adjusts itself to the workload, by way of how the slabs
are allocated and used. If your users have radically different sizes
of values that they're storing, it's going to make trouble for slab
availability for other sizes. memcached does not resize these slabs
after they're in use.
Aaron