>
> 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.

Reply via email to