Last week, I asked about creating transients that would update before expiry to prevent users from waiting for the long loading time. I was pointed to WP-TLC-Transients which sound like exactly what I need, but unfortunately, I am at a loss with where to begin.
Here are the associated files:
- class-tlc-transient-update-server.php
- class-tlc-transient.php
- functions.php
- tlc-transients.php
Hopefully this is not too basic a question, but I’m interested in where to place the associated files to even begin trying to work with the code.
EDIT:
I placed class-tlc-transients-update-server.php
, class-tlc-transient.php
, and tlc-transients.php
to my theme’s directory and added include( get_stylesheet_directory() . '/tlc-transients.php' );
to my functions.php
With that settled, I plan on following the example in the readme. Are tlc-transients saved in the same place at wordpress transients? I’m wondering how I can best check if my implementation is successful.
Thank you!
tlc-transients.php
during your plugin/theme load (or otherwise beforeinit
hook)PS in [still not very common] case you are using Composer you can also just require
markjaquith/wp-tlc-transients
incomposer.json
.