{
    "mode": "perldoc",
    "parameter": "Memoize",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Memoize/json",
    "generated": "2026-06-14T00:33:46Z",
    "synopsis": "# This is the documentation for Memoize 1.03\nuse Memoize;\nmemoize('slowfunction');\nslowfunction(arguments);    # Is faster than it was before\nThis is normally all you need to know. However, many options are available:\nmemoize(function, options...);\nOptions include:\nNORMALIZER => function\nINSTALL => newname\nSCALARCACHE => 'MEMORY'\nSCALARCACHE => ['HASH', \\%cachehash ]\nSCALARCACHE => 'FAULT'\nSCALARCACHE => 'MERGE'\nLISTCACHE => 'MEMORY'\nLISTCACHE => ['HASH', \\%cachehash ]\nLISTCACHE => 'FAULT'\nLISTCACHE => 'MERGE'",
    "sections": {
        "NAME": {
            "content": "Memoize - Make functions faster by trading space for time\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "# This is the documentation for Memoize 1.03\nuse Memoize;\nmemoize('slowfunction');\nslowfunction(arguments);    # Is faster than it was before\n\nThis is normally all you need to know. However, many options are available:\n\nmemoize(function, options...);\n\nOptions include:\n\nNORMALIZER => function\nINSTALL => newname\n\nSCALARCACHE => 'MEMORY'\nSCALARCACHE => ['HASH', \\%cachehash ]\nSCALARCACHE => 'FAULT'\nSCALARCACHE => 'MERGE'\n\nLISTCACHE => 'MEMORY'\nLISTCACHE => ['HASH', \\%cachehash ]\nLISTCACHE => 'FAULT'\nLISTCACHE => 'MERGE'\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "`Memoizing' a function makes it faster by trading space for time. It does this by caching the\nreturn values of the function in a table. If you call the function again with the same\narguments, \"memoize\" jumps in and gives you the value out of the table, instead of letting the\nfunction compute the value all over again.\n\nHere is an extreme example. Consider the Fibonacci sequence, defined by the following function:\n\n# Compute Fibonacci numbers\nsub fib {\nmy $n = shift;\nreturn $n if $n < 2;\nfib($n-1) + fib($n-2);\n}\n\nThis function is very slow. Why? To compute fib(14), it first wants to compute fib(13) and",
            "subsections": [
                {
                    "name": "fib",
                    "content": ""
                },
                {
                    "name": "fib",
                    "content": "the same. And both of the times that it wants to compute fib(12), it has to compute fib(11) from\nscratch, and then it has to do it again each time it wants to compute fib(13). This function\ndoes so much recomputing of old results that it takes a really long time to run---fib(14) makes\n1,200 extra recursive calls to itself, to compute and recompute things that it already computed.\n\nThis function is a good candidate for memoization. If you memoize the `fib' function above, it\nwill compute fib(14) exactly once, the first time it needs to, and then save the result in a\ntable. Then if you ask for fib(14) again, it gives you the result out of the table. While\ncomputing fib(14), instead of computing fib(12) twice, it does it once; the second time it needs\nthe value it gets it from the table. It doesn't compute fib(11) four times; it computes it once,\ngetting it from the table the next three times. Instead of making 1,200 recursive calls to\n`fib', it makes 15. This makes the function about 150 times faster.\n\nYou could do the memoization yourself, by rewriting the function, like this:\n\n# Compute Fibonacci numbers, memoized version\n{ my @fib;\nsub fib {\nmy $n = shift;\nreturn $fib[$n] if defined $fib[$n];\nreturn $fib[$n] = $n if $n < 2;\n$fib[$n] = fib($n-1) + fib($n-2);\n}\n}\n\nOr you could use this module, like this:\n\nuse Memoize;\nmemoize('fib');\n\n# Rest of the fib function just like the original version.\n\nThis makes it easy to turn memoizing on and off.\n\nHere's an even simpler example: I wrote a simple ray tracer; the program would look in a certain\ndirection, figure out what it was looking at, and then convert the `color' value (typically a\nstring like `red') of that object to a red, green, and blue pixel value, like this:\n\nfor ($direction = 0; $direction < 300; $direction++) {\n# Figure out which object is in direction $direction\n$color = $object->{color};\n($r, $g, $b) = @{&ColorToRGB($color)};\n...\n}\n\nSince there are relatively few objects in a picture, there are only a few colors, which get\nlooked up over and over again. Memoizing \"ColorToRGB\" sped up the program by several percent.\n"
                }
            ]
        },
        "DETAILS": {
            "content": "This module exports exactly one function, \"memoize\". The rest of the functions in this package\nare None of Your Business.\n\nYou should say\n\nmemoize(function)\n\nwhere \"function\" is the name of the function you want to memoize, or a reference to it.\n\"memoize\" returns a reference to the new, memoized version of the function, or \"undef\" on a\nnon-fatal error. At present, there are no non-fatal errors, but there might be some in the\nfuture.\n\nIf \"function\" was the name of a function, then \"memoize\" hides the old version and installs the\nnew memoized version under the old name, so that \"&function(...)\" actually invokes the memoized\nversion.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "There are some optional options you can pass to \"memoize\" to change the way it behaves a little.\nTo supply options, invoke \"memoize\" like this:\n\nmemoize(function, NORMALIZER => function,\nINSTALL => newname,\nSCALARCACHE => option,\nLISTCACHE => option\n);\n\nEach of these options is optional; you can include some, all, or none of them.\n\nINSTALL\nIf you supply a function name with \"INSTALL\", memoize will install the new, memoized version of\nthe function under the name you give. For example,\n\nmemoize('fib', INSTALL => 'fastfib')\n\ninstalls the memoized version of \"fib\" as \"fastfib\"; without the \"INSTALL\" option it would have\nreplaced the old \"fib\" with the memoized version.\n\nTo prevent \"memoize\" from installing the memoized version anywhere, use \"INSTALL => undef\".\n\nNORMALIZER\nSuppose your function looks like this:\n\n# Typical call: f('aha!', A => 11, B => 12);\nsub f {\nmy $a = shift;\nmy %hash = @;\n$hash{B} ||= 2;  # B defaults to 2\n$hash{C} ||= 7;  # C defaults to 7\n\n# Do something with $a, %hash\n}\n\nNow, the following calls to your function are all completely equivalent:\n\nf(OUCH);\nf(OUCH, B => 2);\nf(OUCH, C => 7);\nf(OUCH, B => 2, C => 7);\nf(OUCH, C => 7, B => 2);\n(etc.)\n\nHowever, unless you tell \"Memoize\" that these calls are equivalent, it will not know that, and\nit will compute the values for these invocations of your function separately, and store them\nseparately.\n\nTo prevent this, supply a \"NORMALIZER\" function that turns the program arguments into a string\nin a way that equivalent arguments turn into the same string. A \"NORMALIZER\" function for \"f\"\nabove might look like this:\n\nsub normalizef {\nmy $a = shift;\nmy %hash = @;\n$hash{B} ||= 2;\n$hash{C} ||= 7;\n\njoin(',', $a, map ($ => $hash{$}) sort keys %hash);\n}\n\nEach of the argument lists above comes out of the \"normalizef\" function looking exactly the\nsame, like this:\n\nOUCH,B,2,C,7\n\nYou would tell \"Memoize\" to use this normalizer this way:\n\nmemoize('f', NORMALIZER => 'normalizef');\n\n\"memoize\" knows that if the normalized version of the arguments is the same for two argument\nlists, then it can safely look up the value that it computed for one argument list and return it\nas the result of calling the function with the other argument list, even if the argument lists\nlook different.\n\nThe default normalizer just concatenates the arguments with character 28 in between. (In ASCII,\nthis is called FS or control-\\.) This always works correctly for functions with only one string\nargument, and also when the arguments never contain character 28. However, it can confuse\ncertain argument lists:\n\nnormalizer(\"a\\034\", \"b\")\nnormalizer(\"a\", \"\\034b\")\nnormalizer(\"a\\034\\034b\")\n\nfor example.\n\nSince hash keys are strings, the default normalizer will not distinguish between \"undef\" and the\nempty string. It also won't work when the function's arguments are references. For example,\nconsider a function \"g\" which gets two arguments: A number, and a reference to an array of\nnumbers:\n\ng(13, [1,2,3,4,5,6,7]);\n\nThe default normalizer will turn this into something like \"13\\034ARRAY(0x436c1f)\". That would be\nall right, except that a subsequent array of numbers might be stored at a different location\neven though it contains the same data. If this happens, \"Memoize\" will think that the arguments\nare different, even though they are equivalent. In this case, a normalizer like this is\nappropriate:\n\nsub normalize { join ' ', $[0], @{$[1]} }\n\nFor the example above, this produces the key \"13 1 2 3 4 5 6 7\".\n\nAnother use for normalizers is when the function depends on data other than those in its\narguments. Suppose you have a function which returns a value which depends on the current hour\nof the day:\n\nsub onduty {\nmy ($problemtype) = @;\nmy $hour = (localtime)[2];\nopen my $fh, \"$DIR/$problemtype\" or die...;\nmy $line;\nwhile ($hour-- > 0)\n$line = <$fh>;\n}\nreturn $line;\n}\n\nAt 10:23, this function generates the 10th line of a data file; at 3:45 PM it generates the 15th\nline instead. By default, \"Memoize\" will only see the $problemtype argument. To fix this,\ninclude the current hour in the normalizer:\n\nsub normalize { join ' ', (localtime)[2], @ }\n\nThe calling context of the function (scalar or list context) is propagated to the normalizer.\nThis means that if the memoized function will treat its arguments differently in list context\nthan it would in scalar context, you can have the normalizer function select its behavior based\non the results of \"wantarray\". Even if called in a list context, a normalizer should still\nreturn a single string.\n\n\"SCALARCACHE\", \"LISTCACHE\"\nNormally, \"Memoize\" caches your function's return values into an ordinary Perl hash variable.\nHowever, you might like to have the values cached on the disk, so that they persist from one run\nof your program to the next, or you might like to associate some other interesting semantics\nwith the cached values.\n\nThere's a slight complication under the hood of \"Memoize\": There are actually *two* caches, one\nfor scalar values and one for list values. When your function is called in scalar context, its\nreturn value is cached in one hash, and when your function is called in list context, its value\nis cached in the other hash. You can control the caching behavior of both contexts independently\nwith these options.\n\nThe argument to \"LISTCACHE\" or \"SCALARCACHE\" must either be one of the following four strings:\n\nMEMORY\nFAULT\nMERGE\nHASH\n\nor else it must be a reference to an array whose first element is one of these four strings,\nsuch as \"[HASH, arguments...]\".\n\n\"MEMORY\"\n\"MEMORY\" means that return values from the function will be cached in an ordinary Perl hash\nvariable. The hash variable will not persist after the program exits. This is the default.\n\n\"HASH\"\n\"HASH\" allows you to specify that a particular hash that you supply will be used as the\ncache. You can tie this hash beforehand to give it any behavior you want.\n\nA tied hash can have any semantics at all. It is typically tied to an on-disk database, so\nthat cached values are stored in the database and retrieved from it again when needed, and\nthe disk file typically persists after your program has exited. See \"perltie\" for more\ncomplete details about \"tie\".\n\nA typical example is:\n\nuse DBFile;\ntie my %cache => 'DBFile', $filename, ORDWR|OCREAT, 0666;\nmemoize 'function', SCALARCACHE => [HASH => \\%cache];\n\nThis has the effect of storing the cache in a \"DBFile\" database whose name is in $filename.\nThe cache will persist after the program has exited. Next time the program runs, it will\nfind the cache already populated from the previous run of the program. Or you can forcibly\npopulate the cache by constructing a batch program that runs in the background and populates\nthe cache file. Then when you come to run your real program the memoized function will be\nfast because all its results have been precomputed.\n\nAnother reason to use \"HASH\" is to provide your own hash variable. You can then inspect or\nmodify the contents of the hash to gain finer control over the cache management.\n\n\"TIE\"\nThis option is no longer supported. It is still documented only to aid in the debugging of\nold programs that use it. Old programs should be converted to use the \"HASH\" option instead.\n\nmemoize ... ['TIE', PACKAGE, ARGS...]\n\nis merely a shortcut for\n\nrequire PACKAGE;\n{ tie my %cache, PACKAGE, ARGS...;\nmemoize ... [HASH => \\%cache];\n}\n\n\"FAULT\"\n\"FAULT\" means that you never expect to call the function in scalar (or list) context, and\nthat if \"Memoize\" detects such a call, it should abort the program. The error message is one\nof\n\n`foo' function called in forbidden list context at line ...\n`foo' function called in forbidden scalar context at line ...\n\n\"MERGE\"\n\"MERGE\" normally means that the memoized function does not distinguish between list and\nsclar context, and that return values in both contexts should be stored together. Both\n\"LISTCACHE => MERGE\" and \"SCALARCACHE => MERGE\" mean the same thing.\n\nConsider this function:\n\nsub complicated {\n# ... time-consuming calculation of $result\nreturn $result;\n}\n\nThe \"complicated\" function will return the same numeric $result regardless of whether it is\ncalled in list or in scalar context.\n\nNormally, the following code will result in two calls to \"complicated\", even if\n\"complicated\" is memoized:\n\n$x = complicated(142);\n($y) = complicated(142);\n$z = complicated(142);\n\nThe first call will cache the result, say 37, in the scalar cache; the second will cach the\nlist \"(37)\" in the list cache. The third call doesn't call the real \"complicated\" function;\nit gets the value 37 from the scalar cache.\n\nObviously, the second call to \"complicated\" is a waste of time, and storing its return value\nis a waste of space. Specifying \"LISTCACHE => MERGE\" will make \"memoize\" use the same cache\nfor scalar and list context return values, so that the second call uses the scalar cache\nthat was populated by the first call. \"complicated\" ends up being called only once, and both\nsubsequent calls return 3 from the cache, regardless of the calling context.\n\nList values in scalar context\nConsider this function:\n\nsub iota { return reverse (1..$[0]) }\n\nThis function normally returns a list. Suppose you memoize it and merge the caches:\n\nmemoize 'iota', SCALARCACHE => 'MERGE';\n\n@i7 = iota(7);\n$i7 = iota(7);\n\nHere the first call caches the list (1,2,3,4,5,6,7). The second call does not really make sense.\n\"Memoize\" cannot guess what behavior \"iota\" should have in scalar context without actually\ncalling it in scalar context. Normally \"Memoize\" *would* call \"iota\" in scalar context and cache\nthe result, but the \"SCALARCACHE => 'MERGE'\" option says not to do that, but to use the cache\nlist-context value instead. But it cannot return a list of seven elements in a scalar context.\nIn this case $i7 will receive the first element of the cached list value, namely 7.\n\nMerged disk caches\nAnother use for \"MERGE\" is when you want both kinds of return values stored in the same disk\nfile; this saves you from having to deal with two disk files instead of one. You can use a\nnormalizer function to keep the two sets of return values separate. For example:\n\ntie my %cache => 'MLDBM', 'DBFile', $filename, ...;\n\nmemoize 'myfunc',\nNORMALIZER => 'n',\nSCALARCACHE => [HASH => \\%cache],\nLISTCACHE => 'MERGE',\n;\n\nsub n {\nmy $context = wantarray() ? 'L' : 'S';\n# ... now compute the hash key from the arguments ...\n$hashkey = \"$context:$hashkey\";\n}\n\nThis normalizer function will store scalar context return values in the disk file under keys\nthat begin with \"S:\", and list context return values under keys that begin with \"L:\".\n",
            "subsections": []
        },
        "OTHER FACILITIES": {
            "content": "\"unmemoize\"\nThere's an \"unmemoize\" function that you can import if you want to. Why would you want to?\nHere's an example: Suppose you have your cache tied to a DBM file, and you want to make sure\nthat the cache is written out to disk if someone interrupts the program. If the program exits\nnormally, this will happen anyway, but if someone types control-C or something then the program\nwill terminate immediately without synchronizing the database. So what you can do instead is\n\n$SIG{INT} = sub { unmemoize 'function' };\n\n\"unmemoize\" accepts a reference to, or the name of a previously memoized function, and undoes\nwhatever it did to provide the memoized version in the first place, including making the name\nrefer to the unmemoized version if appropriate. It returns a reference to the unmemoized version\nof the function.\n\nIf you ask it to unmemoize a function that was never memoized, it croaks.\n\n\"flushcache\"\n\"flushcache(function)\" will flush out the caches, discarding *all* the cached data. The\nargument may be a function name or a reference to a function. For finer control over when data\nis discarded or expired, see the documentation for \"Memoize::Expire\", included in this package.\n\nNote that if the cache is a tied hash, \"flushcache\" will attempt to invoke the \"CLEAR\" method\non the hash. If there is no \"CLEAR\" method, this will cause a run-time error.\n\nAn alternative approach to cache flushing is to use the \"HASH\" option (see above) to request\nthat \"Memoize\" use a particular hash variable as its cache. Then you can examine or modify the\nhash at any time in any way you desire. You may flush the cache by using \"%hash = ()\".\n",
            "subsections": []
        },
        "CAVEATS": {
            "content": "Memoization is not a cure-all:\n\n*   Do not memoize a function whose behavior depends on program state other than its own\narguments, such as global variables, the time of day, or file input. These functions will\nnot produce correct results when memoized. For a particularly easy example:\n\nsub f {\ntime;\n}\n\nThis function takes no arguments, and as far as \"Memoize\" is concerned, it always returns\nthe same result. \"Memoize\" is wrong, of course, and the memoized version of this function\nwill call \"time\" once to get the current time, and it will return that same time every time\nyou call it after that.\n\n*   Do not memoize a function with side effects.\n\nsub f {\nmy ($a, $b) = @;\nmy $s = $a + $b;\nprint \"$a + $b = $s.\\n\";\n}\n\nThis function accepts two arguments, adds them, and prints their sum. Its return value is\nthe numuber of characters it printed, but you probably didn't care about that. But \"Memoize\"\ndoesn't understand that. If you memoize this function, you will get the result you expect\nthe first time you ask it to print the sum of 2 and 3, but subsequent calls will return 1\n(the return value of \"print\") without actually printing anything.\n\n*   Do not memoize a function that returns a data structure that is modified by its caller.\n\nConsider these functions: \"getusers\" returns a list of users somehow, and then \"main\" throws\naway the first user on the list and prints the rest:\n\nsub main {\nmy $userlist = getusers();\nshift @$userlist;\nforeach $u (@$userlist) {\nprint \"User $u\\n\";\n}\n}\n\nsub getusers {\nmy @users;\n# Do something to get a list of users;\n\\@users;  # Return reference to list.\n}\n\nIf you memoize \"getusers\" here, it will work right exactly once. The reference to the users\nlist will be stored in the memo table. \"main\" will discard the first element from the\nreferenced list. The next time you invoke \"main\", \"Memoize\" will not call \"getusers\"; it\nwill just return the same reference to the same list it got last time. But this time the\nlist has already had its head removed; \"main\" will erroneously remove another element from\nit. The list will get shorter and shorter every time you call \"main\".\n\nSimilarly, this:\n\n$u1 = getusers();\n$u2 = getusers();\npop @$u1;\n\nwill modify $u2 as well as $u1, because both variables are references to the same array. Had\n\"getusers\" not been memoized, $u1 and $u2 would have referred to different arrays.\n\n*   Do not memoize a very simple function.\n\nRecently someone mentioned to me that the Memoize module made his program run slower instead\nof faster. It turned out that he was memoizing the following function:\n\nsub square {\n$[0] * $[0];\n}\n\nI pointed out that \"Memoize\" uses a hash, and that looking up a number in the hash is\nnecessarily going to take a lot longer than a single multiplication. There really is no way\nto speed up the \"square\" function.\n\nMemoization is not magical.\n",
            "subsections": []
        },
        "PERSISTENT CACHE SUPPORT": {
            "content": "You can tie the cache tables to any sort of tied hash that you want to, as long as it supports\n\"TIEHASH\", \"FETCH\", \"STORE\", and \"EXISTS\". For example,\n\ntie my %cache => 'GDBMFile', $filename, ORDWR|OCREAT, 0666;\nmemoize 'function', SCALARCACHE => [HASH => \\%cache];\n\nworks just fine. For some storage methods, you need a little glue.\n\n\"SDBMFile\" doesn't supply an \"EXISTS\" method, so included in this package is a glue module\ncalled \"Memoize::SDBMFile\" which does provide one. Use this instead of plain \"SDBMFile\" to\nstore your cache table on disk in an \"SDBMFile\" database:\n\ntie my %cache => 'Memoize::SDBMFile', $filename, ORDWR|OCREAT, 0666;\nmemoize 'function', SCALARCACHE => [HASH => \\%cache];\n\n\"NDBMFile\" has the same problem and the same solution. (Use \"Memoize::NDBMFile instead of\nplain NDBMFile.\")\n\n\"Storable\" isn't a tied hash class at all. You can use it to store a hash to disk and retrieve\nit again, but you can't modify the hash while it's on the disk. So if you want to store your\ncache table in a \"Storable\" database, use \"Memoize::Storable\", which puts a hashlike front-end\nonto \"Storable\". The hash table is actually kept in memory, and is loaded from your \"Storable\"\nfile at the time you memoize the function, and stored back at the time you unmemoize the\nfunction (or when your program exits):\n\ntie my %cache => 'Memoize::Storable', $filename;\nmemoize 'function', SCALARCACHE => [HASH => \\%cache];\n\ntie my %cache => 'Memoize::Storable', $filename, 'nstore';\nmemoize 'function', SCALARCACHE => [HASH => \\%cache];\n\nInclude the `nstore' option to have the \"Storable\" database written in `network order'. (See\nStorable for more details about this.)\n\nThe \"flushcache()\" function will raise a run-time error unless the tied package provides a\n\"CLEAR\" method.\n",
            "subsections": []
        },
        "EXPIRATION SUPPORT": {
            "content": "See Memoize::Expire, which is a plug-in module that adds expiration functionality to Memoize. If\nyou don't like the kinds of policies that Memoize::Expire implements, it is easy to write your\nown plug-in module to implement whatever policy you desire. Memoize comes with several examples.\nAn expiration manager that implements a LRU policy is available on CPAN as Memoize::ExpireLRU.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "The test suite is much better, but always needs improvement.\n\nThere is some problem with the way \"goto &f\" works under threaded Perl, perhaps because of the\nlexical scoping of @. This is a bug in Perl, and until it is resolved, memoized functions will\nsee a slightly different \"caller()\" and will perform a little more slowly on threaded perls than\nunthreaded perls.\n\nSome versions of \"DBFile\" won't let you store data under a key of length 0. That means that if\nyou have a function \"f\" which you memoized and the cache is in a \"DBFile\" database, then the\nvalue of \"f()\" (\"f\" called with no arguments) will not be memoized. If this is a big problem,\nyou can supply a normalizer function that prepends \"x\" to every key.\n",
            "subsections": []
        },
        "MAILING LIST": {
            "content": "To join a very low-traffic mailing list for announcements about \"Memoize\", send an empty note to\n\"mjd-perl-memoize-request@plover.com\".\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Mark-Jason Dominus (\"mjd-perl-memoize+@plover.com\"), Plover Systems co.\n\nSee the \"Memoize.pm\" Page at http://perl.plover.com/Memoize/ for news and upgrades. Near this\npage, at http://perl.plover.com/MiniMemoize/ there is an article about memoization and about the\ninternals of Memoize that appeared in The Perl Journal, issue #13. (This article is also\nincluded in the Memoize distribution as `article.html'.)\n\nThe author's book *Higher-Order Perl* (2005, ISBN 1558607013, published by Morgan Kaufmann)\ndiscusses memoization (and many other topics) in tremendous detail. It is available on-line for\nfree. For more information, visit http://hop.perl.plover.com/ .\n\nTo join a mailing list for announcements about \"Memoize\", send an empty message to\n\"mjd-perl-memoize-request@plover.com\". This mailing list is for announcements only and has\nextremely low traffic---fewer than two messages per year.\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "Copyright 1998, 1999, 2000, 2001, 2012 by Mark Jason Dominus\n\nThis library is free software; you may redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        },
        "THANK YOU": {
            "content": "Many thanks to Florian Ragwitz for administration and packaging assistance, to John Tromp for\nbug reports, to Jonathan Roy for bug reports and suggestions, to Michael Schwern for other bug\nreports and patches, to Mike Cariaso for helping me to figure out the Right Thing to Do About\nExpiration, to Joshua Gerth, Joshua Chamas, Jonathan Roy (again), Mark D. Anderson, and Andrew\nJohnson for more suggestions about expiration, to Brent Powers for the Memoize::ExpireLRU\nmodule, to Ariel Scolnicov for delightful messages about the Fibonacci function, to Dion Almaer\nfor thought-provoking suggestions about the default normalizer, to Walt Mankowski and Kurt\nStarsinic for much help investigating problems under threaded Perl, to Alex Dudkevich for\nreporting the bug in prototyped functions and for checking my patch, to Tony Bass for many\nhelpful suggestions, to Jonathan Roy (again) for finding a use for \"unmemoize()\", to Philippe\nVerdret for enlightening discussion of \"Hook::PrePostCall\", to Nat Torkington for advice I\nignored, to Chris Nandor for portability advice, to Randal Schwartz for suggesting the\n'\"flushcache\" function, and to Jenda Krynicky for being a light in the world.\n\nSpecial thanks to Jarkko Hietaniemi, the 5.8.0 pumpking, for including this module in the core\nand for his patient and helpful guidance during the integration process.\n",
            "subsections": []
        }
    },
    "summary": "Memoize - Make functions faster by trading space for time",
    "flags": [],
    "examples": [],
    "see_also": []
}