Coding rules

Rule #6 Delay caching

Implementing cache will speed up your treatment.

But always code a pure algorithmic implementation before implementing caching. This has the advantage of allowing proper unit testing : if a method already take a LazyDatabaseCollection as an argument, it may become untestable - and is usually bad design.