Hi there,
first of all i would like to say, that i love MODx for its simplicity! The idea to split the templates into chunks, snippets, modules etc. is brilliant.
I already successfully wrote some basic snippets, used the DBAPI and chunks from within the snippets.
Now i have got some snippets that fetch information from the db which is valid for several hours. I would like to control the caching by myself, can i use MODx cache functions within my code?
Is there something like $modx->getCache($key), $modx->putCache($key, $value) or something similar?
best regards,
Juri
PS: where is the file containing the class for $modx?
Hi, thank you for the hint. I guess i dig into the new release.
Thanks
-
☆ A M B ☆
- 24,524 Posts
You should use return for a snippet’s output, not echo.