Memcache + Dynamic Query Filters
K J
sanbat at gmail.com
Sun Sep 30 21:26:27 UTC 2007
>
> I am trying to use memcached for a web application with search
> functionality. All search queries work on certain number of parameters ( the
> parameters are numbers or boolean ).
> There is also an additional parameter ( date range ) which is also
> attached to the query.
>
> One of my sample query ( sql ) looks like
> select * from table where type = 1 and ( occurred_date between 'some date'
> and 'some date');
>
> Has someone out here dealt with date range based querying using memcached
> before or have any ideas around how to use ( if at all ) memcached for such
> dynamic queries ?
You could store each query indexed by the MD5 of the mysql query. Then when
doing a new query, search to see if it's already in the cache.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071001/dd484744/attachment.html
More information about the memcached
mailing list