The attached patch exposes the memoization cache and original pre-memoized value as metadata on memoized functions.
The metadata keys are ::memoize-cache and :rememoized respectively, to which I'm not too attached.
Can you say more about the problems(s) being solved there? Given all the other feature work that has been done/requested around memoization, tempted to let this work happen in a contrib library first. But that is partially because I don't know from this ticket what pain is being addressed.
I'm in support of a smarter memoize a la unk; this could be considered a stop-gap measure that helps in situations where the current memoize implementation simply cannot be used due to unbounded memory use.
I've also come across circumstances where I can't use memoize because it will make my function untestable, though admittedly these involve memoizing impure functions—perhaps the answer there is just "don't do that".