Support » Plugins and Hacks » [Resolved] Paginated comment pages aren't cleared/purged

[Resolved] Paginated comment pages aren't cleared/purged

  • Thanks for the plugin. I noticed that post comment pagination pages aren’t cleared during the typical necessary routines. For instance, let’s say there was the following blog post
    and a comment is added, edited, approved, disapproved. Lite Cache will properly clear the first page, but it won’t clear any of the following:


    Since you’re using a directory structure for caching, wouldn’t it make sense to simply delete the single blog post folder (e.g., hello), which will cascade and delete any paginated items? Like a recursive delete?

    Otherwise, with the cache’s existing logic, it doesn’t look like comment pagination caches would be deleted under any circumstance, short of scheduled garbage collection.



Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stefano Lissa


    Yes, the post related folder is deleted. If not there is some kind of problem in your installation.

    Stefano, thanks for responding. I was testing on a windows environment, and it wasn’t working. I took a look at the remove_dir() function and I think I found where the problem is. You have the following:

    if (substr($file, -1) == '/')

    The problem is, that particular code assumes the directory separator is a forward slash, but on Windows, it’s a backslash. So Lite Cache will think every directory is a file.

    Replacing the above with the following fixes the recursive delete operation:

    if (substr($file, -1) == DIRECTORY_SEPARATOR)

    But you also have hard-coded references to ‘/’ throughout the code that assumes a non-Windows environment.

    Plugin Author Stefano Lissa


    Fixed. Actually PHP as other multi-os system correctly manages the / as separator, but not for the glob function… 🙁

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Paginated comment pages aren't cleared/purged’ is closed to new replies.