Hello!

I have this idea for extending how the query cache works, but I don't
know nearly enough
to tell if this is feasible or not:

Suppose I have a fixed SQL query Q, and I want to track the result set
of Q as other users update the database.
But, I don't want to keep hitting the database to track the changes to
Q. So, I was thinking of the following setup:

1) generate LINQ equivalent of Q
2) initial run of Q against the database. Results will get put in the
query cache. Mark this query somehow so that it never gets evicted
from the query cache
3) handle NHibernate PostUpdate event, and run LINQ to Object query on
updated objects
4) if update modifies the results of Q, then update results in cache

If I can get this working, then I can significantly reduce load on my
database.

Background: server farm with memcached second level cache.

Thanks!!!!

Jorge

Reply via email to