load values into a memcache
Randy Wigginton
krw at nobugz.com
Wed Mar 7 22:23:51 UTC 2007
We have a separate process to populate the memcache, as we have
similar requirements (sometimes).
On Mar 7, 2007, at 2:19 PM, son at raider.co.nz wrote:
>
>> I would suggest you hit the database and fill the cache only as
>> requests
>> come in. If you have some notion of high-trafficked keys, you could
>> perhaps warm the cache appropriately.
>>
>> If a given key gets a ton of hits, it will quickly be in the
>> cache. If
>> a given key gets no hits, well, why would you want it in the cache?
>>
>> Enjoy!
>>
>
>
> Thank you for your suggestion. My problem is my site may have ton
> of hits
> for a second (eg. 2000 hits/second).
>
>
> My application is redirect url. If a user enter a url, he will be
> redirect to another one. So it needs fast. I store keys is
> "from_url" and
> value is "to_url"
>
> If I call database for a request (of course, this request is not in
> memcache yet), I may miss some hits as a query need a time to get
> back the
> result.
>
> ONly when I need to add a redirect (from_url and to_url), I will
> update
> this memcache
>
>
>
More information about the memcached
mailing list