Make sure cache memoization works across requests #1

Merged
merged 1 commit into from Jul 12, 2012

Projects

None yet

2 participants

@melo
Contributor
melo commented May 22, 2012

The $class parameter of cache_memoized() can be an object in some
situations, so the memoize cache would have an entry per instance.

Given that we create component instances on each call, this cache would
grow very fast, and the memoization would not work across multiple
requests or even multiple calls to the same component.

To fix, we now force the $class to be just the class name.

Signed-off-by: Pedro Melo melo@simplicidade.org

@melo melo Make sure cache memoization works across requests
The $class parameter of cache_memoized() can be an object in some
situations, so the memoize cache would have an entry per instance.

Given that we create component instances on each call, this cache would
grow very fast, and the memoization would not work across multiple
requests or even multiple calls to the same component.

To fix, we now force the $class to be just the class name.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
aebce2b
@jonswar jonswar merged commit df1f519 into jonswar:master Jul 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment