I have a neo4j database server sitting behind a ruby HTTP proxy that handles user authentication to a database on Heroku. I've been trying to think of an elegant way of how to handle caching of ReST responses from the neo4j server while invalidating those results when nodes and relationships change.
At the moment, my database is small and much more likely to be read than written to so keeping all GET results in a map and clearing them on POST, PUT or DELETE requests might be an option although I've not implemented it yet so no idea what the improvement is. In the longer term I would like a more fine grained solution to caching/invalidation.
Has anyone implemented anything like this or have ideas for a better solution?