Respect/Config — Issue #18: Cache
Author: alganet
Created: 2012-02-23 14:32:09+00:00
State: open

At some point, we're going to need cache for containers. I have absolutely no plans to include a cache library inside the Config's core, but the Container and Instantiators need to be *cacheable*, or at east serializable to a string that can be cached.

I'd have success serializing a virgin container, that haven't instantiated any instance yet (a full lazy loaded container). Quickest way to cache things I see is to flag the container/instantiator as "dirty" when some instance comes out of the lazy zone. Only "virgin" containers would be serializable.

The idea is to cache the entire container as soon as its loaded from INI files.

We also need to reduce statefullness from the component's classes. The least information we keep on properties the better for cacheability. For example, we could get rid of the Instantiator->params attribute after Instantiator parsing.

Thoughts?