Daobab Cache

One of the greatest features is an extremely fast buffered cache, worked as DAO decorator.
Daobab is able to execute the same queries both on database or in-memory buffers.
Any entity list result, automatically becomes an new cached buffer, and can be used instantly as a target for further sub-queries.

What/s special into Daobab Cache?

Basically Daobab Cache is a simple entities collection.
However, Daobab functionality is able to execute SQL Queries in extraordinary speed.
The cache can be fulfilled:

  • by database - by reading all entities from table from DAO
  • as a result of any entity list Select
  • as a collection into code

For Daobab, every cache is DAO and Select can be executed over it.
That's why you can treat in-memory collecion as database and queries can be so quick

Benefits of usage

  • no load on the database engine
  • datasource pool not used
  • no network load
  • thread is not consumed for waiting
  • lowered memory usage

When to use cache?

  • for static indexed data, used elsewhere (dictionaries etc)
  • for transition tables
  • when the most important is speed

When not to use Cache?

  • when table has more than milion rows
  • when table has many LOB cells and too much memory could be consumed for it
  • for tables where data changes very oft
  • for occasionally readed data