WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Caching with Reading from Text File? (2 posts)

  1. ashes999
    Member
    Posted 6 years ago #

    Hi,

    I wrote a plugin. The high-level view is: it allows people to write blocks between square-brackets in a post, and converts it to HTML. How does it convert it? It reads up the name from a text-file.

    So if I wrote [bookQuote author="Blah" text="blah blah" page="92"], it'll look up a file called patterns.txt, look for the definition of blockQuote, and substitute it in. Convert it to some fancy HTML with divs and spans and stuff.

    This works great. But what I want is to be able to edit this one text file and instantly see all my posts updated to use the new pattern. Even though the performance is horrible, right now, it's reading from the text file every single time. But if I edit the patterns file, and re-upload it, the posts still show the old pattern--until I hit "save" again on each post. (I have WP-Cache, but it's disabled.)

    What's up with that? Is there a solution? Without this, the whole plugin is pretty pointless ... I can hardly re-save each post when I make a change!

    Also, I should mention that I've registered my filter with the "the_content" method.

  2. ashes999
    Member
    Posted 6 years ago #

    I'm not sure if I should be happy about this solution or not ...

    I had WP-cache installed, and it was enabled for a while; I disabled it for development. Still, though, it was using the cached copies of those pages.

    Wierd. Very, very wierd.

    But it's fixed! ^^ turns out to be a non-issue now.

Topic Closed

This topic has been closed to new replies.

About this Topic