Memory depends

First version of the *depends* parameter of the *Memory.cache* function.

This patch allows to add dependencies to a function to cache.
The cache is invalidated when one of the dependencies has been modified.

i am open to any discussion to improve this first draft in order to include it later in the master.