Menu module caching when cache time set to 0
- Status
- Closed
- Subject
- Menu module caching when cache time set to 0
- Version
- 12.x Regression
14.x
17.x - Category
- Regression
- Feature
- User Menu
- Resolution status
- Partially solved
- Submitted by
- jcarter
- Lastmod by
- Wiebe
- Rating
- Description
The set up I have on my local install, and it is demonstrated below.
Problem:- have structure
- have menu module showing structure
- when add page to structure, it should show in menu module
- menu module is cached, though it has cache time set to 0 (to never cache). This makes it so when you add a page you have to clear cache for it to show up in the menu module.
- Solution
- Fixed! -> Caching issue isn't an issue when menu module is used in horizontal mode instead of the vertical mode. So don't place the structure menu in the left bar but somewhere on the top of the page and change the menu display from horz. to vert.
- Workaround
Dunno why this fixes it, but probably not the best way to do this.
Modify
lib/smarty_tiki/function.menu.php, comment out statement starting at line 123, shown below.Copy to clipboardif (strpos($_SERVER['SCRIPT_NAME'], 'tiki-register') === false) { $cachelib->cacheItem($cacheName, serialize(array($menu_info, $channels)), $cacheType); }Another workaround:
create a cron job to clear the cache with this command:
ls -1d ./temp/cache/* |grep -v -e index.php | xargs -r /bin/rm- Importance
- 6
- Easy to solve?
- 7
- Priority
- 42
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is currently unavailableUnable to connect to show.tikiwiki.org. Please let us know of the problem so that we can do something about it. Thanks.
- Ticket ID
- 5081
- Created
- Friday 03 January, 2014 17:28:38 UTC
by jcarter - LastModif
- Wednesday 14 February, 2018 11:24:42 UTC