Forum OpenACS Development: Response to Categories in OpenACS 4

Collapse
Posted by Jun Yamog on
Hi,

Would you think it would be wise to store this categories in memory?
Right now I am getting for my pages to use CR.  So I have a navigation
bar for my pages which can be a category basically.  I have done it
initially using lists of keys to look up arrays.  I think getting this
stuff from memory might be faster than getting it straigth to the
database.  Context_bar gets everything from the database each page load.

Is it better to cache things (small things) in memory than get it from
the database?  If yes what is the best way to do this?

- Make your own init proc that gets the db contents and puts in your
data structure.

- Use memoize stuff

- Use ns_cache

- others.

What is the best way to cache contents from the db like the categories
from CR?

Jun