I was doing some tests trying to understand how the cache invalidation process works. Based on an analisys of the workflow delivered with LiveSite, I could see that the invalidation is pretty simple:
- create a file with the names of the pages you wish to invalidate
siteName/page1
siteName/page2
siteName/page3
- put that file in the proper directory on the front-end, should be in the sites directory.
- wait 30 seconds, there is an invalidate poller process (thread) which finds the file, reads it, processes it, and deletes it. In other words once your cache file has disappear, you know it has been processed.
Well this was all well and good but my pages did not seem to be invalidated. After a lot of banging my head on the walls I realized that actually only page1 was not invalidated. Once I realized that, I switch the pages around in the file, and sure enough my page1, not being on top of the list, started being invalidated. And whatever was on top of the list stopped being invalidated.
So bug number 1: the invalidation process somehow does NOT invalidate the first page in the list, eventhough the logs indicates that it has been found.
In order to "fix" this, I figured to just put some random thing on top, so I did this:
foobar
siteName/page1
siteName/page2
siteName/page3
Bug number 2: that crashed the poller thread because I had no put "something/foobar". Once that thread is crashed, there's no more invalidation until the module is reloaded or the server restarted.
This is LiveSite 2.2.1. These bugs seem pretty amazing to me, did anyone come accross these before?
This should be fixed in a patch even if it has been fixed in LS3.