optimization notes+serial


Serials in the sky for caching


In a hash, in the sky, we have a set  of serial_key=>serial_value pairs.  serial keys can be associated with cards, types, searches, anything.  then, there are two questions to ask.

reading:  what serials does my object depend on?
writing:  what serials does my object affect?

for example, say you have a search:  {"type":"User"}.     depends on serial_key: "type_User"
any card of type User affects key:  "type_User"

one key concept here is when you go to grab the results of the search, you DON'T HAVE TO KNOW what the "type_User" serial_key was last time you saved to the cache.  you just ask for the current one. 

all that remains is to layout the serial_key dependences and affectations.  oh and implementation :-)