memoize.js
No description.

File Location

/goog/memoize/memoize.js


Public Protected Private

Global Functions

goog.memoize.clearCache(cacheOwner)
Clears the memoization cache on the given object.
Arguments:
cacheOwner : Object
The owner of the cache. This is the this context of the memoized function.
code »
goog.memoize(fopt_serializer) !Function
Decorator around functions that caches the inner function's return values. To cache parameterless functions, see goog.functions.cacheReturnValue.
Arguments:
f : Function
The function to wrap. Its return value may only depend on its arguments and 'this' context. There may be further restrictions on the arguments depending on the capabilities of the serializer used.
opt_serializer : function(number, Object): string=
A function to serialize f's arguments. It must have the same signature as goog.memoize.simpleSerializer. It defaults to that function.
Returns: !Function  The wrapped function.
code »
goog.memoize&serializer()
No description.
code »
goog.memoize.simpleSerializer(functionUidargs) string
Simple and fast argument serializer function for goog.memoize. Supports string, number, boolean, null and undefined arguments. Doesn't support \x0B characters in the strings.
Arguments:
functionUid : number
Unique identifier of the function whose result is cached.
args : Object
The arguments that the function to memoize is called with. Note: it is an array-like object, because supports indexing and has the length property.
Returns: string  The list of arguments with type information concatenated with the functionUid argument, serialized as \x0B-separated string.
code »

Directory memoize

File Reference