[Resolved] Caching with Reading from Text File?
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.
- The topic ‘[Resolved] Caching with Reading from Text File?’ is closed to new replies.