Minimizing allocations from memoized functions

The docs are here: Methods · The Julia Language

But I have learnt this only a couple of days ago thanks to this post:

In this particular example of yours it seems to make the code more modular, and you can feed omega and alpha parameters to the object as well.