talis/tripod-php — pull request #24 by rsinger (2014-09-15 21:51:30+00:00)
Title: Less pessimistic cache invalidation: 10%

This branch attempts to make the tablerows cache invalidation slightly less naive, so tablespecs aren't constantly regenerating as resource properties that don't affect the table are changed.

Now, when a MongoGraph is saved, it checks the changeset for the modified properties (it doesn't do this for new or deleted resources -- the cache needs to be invalidated for these no matter what) and associates those properties with the resource URI.

Then, when we try to find the impacted rows, it compiles the defined predicates in the tablespec and checks to see if there is an intersection.

This method isn't perfect: the predicate that matches may actually getting pulled in on a join to a completely different resource, but it should reduce the amount of unnecessary invalidation considerably.

This also removes the need the include "predicates":[""] if you include "value":"_link_" in your tablespec.