Closed xzyfer closed 7 years ago
Alternative you can use a global key backed of the unique-id()
function to prefix all the memo-get
operations but then you end up with a bunch of branches on the memo tree that you don't need taking up memory.
You don't need map-set-deep
here, you should just be able to do map-merge
. Otherwise I like this.
Correct you are :+1: Patched and rebased
Clearing out my open pull requests. This is stale now, and I no longer require it.
I work on a framework that use memoisation for looking up settings from our config tree because tree traversal is expensive in sass.
However because the config tree can change at anytime we need to be able to reset the current memo cache for a module.
This is currently possible with Sassy-Maps with
$Memoization-Table: ();
but it feels hacky.