As many other people in this forum I am trying to create new forums with SQL statements but they are not displayed immediately because of the cache. I read several postings on this issue but none worked:
- Disabling the cache in the config file is not implemented yet
- Rebuilding the cache from the admin interface with a HTTP-GET is not possible, I can not see the required links even in my browser
So I am trying to rebuild the cache myself with some methods I added to my local copy of JForum. Unfortunately, nothing works. My current approach is this:
What also did not work was stopping and starting the cache engine.
So my question is: Does anyone know a _working_ method to disable or (better) refresh the cache? [originally posted on jforum.net by windy]
Migrated From Jforum.net
Joined: Apr 22, 2012
The caching code has always been problematic and a bit mysterious in it's ways. When I needed to do something similar I choose to use the Apache HTTPClient package and my SSO setup to submit "Create New Forum" requests programatically.
This will keep the caching code happy because it's the same as using the admin screens. Fewer "gotcha" than trying to redo and maintain a bunch of jForum's internal code.
Basically, you just have to treat this as a semi-documented REST call. The "documentation" is the source of the form you want to submit.
If you're not using SSO, then you will have to call jForum's login form action with an admin id/password and grab the cookies returned to use with the other requests.