Mathematica: How to clear the cache for a symbol, i.e. Unset pattern-free DownValues
问题 I'm a bad cacher: Sometimes, when no one is watching, I'll cache results without including the full context like so: f[x_]:=f[x]=x+a; a=2; f[1]; DownValues[f] Out[2]= {HoldPattern[f[1]]:>3,HoldPattern[f[x_]]:>(f[x]=x+a)} This leads to horribly subtle bugs, and, more importantly, to the need for clearing the cache when I change the context. One way of clearing the cache is to completely Clear the symbol and repeat the definitions, but this is not really a solution. What I would really like is