Le vendredi 01 janvier 2010 à 21:21 +0100, Ivan Sergio Borgonovo a écrit :
I've found 2 ways... but I'd like to hear something more drupal-halal.
I found this interesting topic in : http://tech.jonathangardner.net/wiki/PostgreSQL/Materialized_Views
Kind regards, Jean-Michel
*********************************************************************** Snapshot with Lazy Refreshes Rather than have scheduled refreshes, you can simply mark the data as wrong and then have whoever is interested in seeing the correct data rebuild it and store the result. If you are very clever, you can combine this with the "Snapshot with Windows" method to include records that will be correct in the future.
Many caching methods I have seen rely on the processes who use the cache to keep it organized and fresh. This isn't unreasonable in the database world, either.
However, there is a significant development cost for this kind of behavior. A typical session would look like:
1. Examine records you are interested in looking at. 2. If there are old records, refresh them. 3. Actually run the query you were interested in again with the fresh data.