ayende/ravendb — pull request #265 by arekais (2013-02-19 13:31:14+00:00)
Title: RavenDB-406 - Cached items are evicted from the cache only if the receiv...

...ed notification is related with them

In order to determine if the received notification is related to any already cached request then DocumentChangeNotification.Id or IndexChangeNotification.Name is used to check if any is part of the cached URL or by comparing the "IndexName" property of returned query result.

For example:
if
DocumentChangeNotification.Id == users/1
then
drop http://localhost:8080/queries?id=users/1

if
IndexChangeNotification.Name == users/by/name
then
drop requests that have url like this:
http://localhost:8080/indexes/users/by/name
or where cached data have "IndexName" == users/by/name