Template tags rely on global $post
(unless you explicitly provide something else to those that support it. So either:
-
they get something from that variable (no reason to go for it in database)
-
or they don’t (then they fail because they have no clue what you want)
Under most normal circumstances there is no reason to worry about impact of template tags. That only comes into play if you start dealing with crazy amount of posts and/or apply overly complex filters.
Update after discussion in comments
get_post()
always tries to invoke cache before it makes database call. Cache gets purged by functions that modify posts explicitly ( see clean_post_cache()
) or expires naturally.
Related Posts:
- Optimize apache for WP use
- Nginx + WordPress + HHVM: Why isn’t Batcache working? Would Varnish help even more?
- Optimizing Jetpack for WordPress [closed]
- Reasonable Size Limit to options entry
- How to cache a different page version based on HTTP header?
- Last-Modified header support doesnât speed up server processing – want more
- How do I serve fully cached full HTML on cloudfront
- Changing WP Object Caching during runtime
- Debug Performance Issues
- Bluehost WebHost and performance problems with W3TC [closed]
- Steps to optimize WordPress in regard to server load and website speed?
- What are the best practices for using a caching plugin on a shared host?
- W3 total cache – cache refresh programmatically [closed]
- Should I use Transient API to store HTML String, or Object?
- Caching: APC vs APCu vs OPcache
- Pros and Cons for high “expire time” on wp-super-cache or w3-total-cache? [closed]
- Limit cache size from W3 Total Cache [closed]
- Does a query executed through wpdb class get cached?
- W3 Leverage browser caching not working for google pagespeed [closed]
- Caching: Force fresh content for logged-in users (potentially by adding a query variable to the URL)
- Using a wildcard with delete_transient()
- Should I use Transients with W3 Total Cache APC Caching? [closed]
- Any reason why wp_cache_set not to work?
- Extremely slow WordPress website with 6000 posts
- How to purge all transient caches?
- Writing a cache manifest file for a WordPress blog (app cache, offline web applications)
- How to force content refresh of a page that has been loaded previously by the user? [closed]
- Help Pinpointing Source of Caching Issue
- Want to enforce the visitor to load the new version of your stylesheets and scripts [closed]
- Can someone explain WordPress caching, and what’s the best in my scenario?
- Transient / object cache maximum key length [duplicate]
- APC object caching in combination Batcache/memcached page caching?
- WordPress caching in development
- What is difference between ‘Page Cache’ and ‘Object Cache’ in WordPress?
- W3 total Cache – Site with query strings
- Programmatically insert hierarchical terms & set terms for post causes glitch? [duplicate]
- Getting soft 404 errors (200 status) when caching plugins are enabled
- How to totally disable cache in WordPress?
- How to purge all transient caches?
- W3 Total Cache plugin integration
- Execute a piece of code also when the cached version of a page is served
- Method to make definitively static an abandoned WP blog
- pass-protected pages and posts not protected after enter them 1 time
- Static HTML page caching for large website [closed]
- WordPress Caching On Demand
- WordPress caching issue
- WP Super Cache Bug with Ubermenu
- Problem with caching, W3TC [closed]
- How to find time last viewed?
- Why a URL with a query is always slower than that without a query?
- WP Rocket Cache Lifespan – Never clear cache? [closed]
- Disable feed cache for custom RSS feed?
- How do I enable dynamic content in a theme cached with WP Super Cache?
- Nav and logo loading each time causing menu to move JointsWP – Foundation 6
- Live website is not showing the changes I’ve made [closed]
- How to prevent/delay MySQL connections when an object cache is used?
- WebHostingBuzz cache statement
- W3 Total Cache can’t create files [closed]
- Files cached as CSS or PHP?
- A bunch of unrelated wordpress using same memcached don’t store correctly their datas
- Why does my site flash white every time it changes page? [closed]
- RSS: fetch_feed caching with different caching delay per feed?
- How to be sure to get last page version without ANY cache?
- Is there a limit to size of data stored in update_option()?
- Avoid loading Facebook buttons and statistics multiple times
- Browser cache for dynamic content (list of tags)
- How to specify expiration of cacheable resources? [closed]
- Repeated nav bar queries failing to be cached
- APC fragmention woes on Apache AWS EC2 Small instance with WordPress and W3TC [closed]
- w3 total cache – Object Caching 2165/2469 objects? [closed]
- Website working fine when logged in but not working fine when we logged out
- Get user name and caching system
- Best practices for the cache of a static WordPress site, including CDN Cache and Cache Plugin
- Site’s first loading on a new browser with no cache is messed up
- Site speed slows when user logged in
- WordPress mobile version is not responsive anymore after installing varnish
- Admin area is caching posts in the editor
- Cache the registration of a custom post type?
- Having issues fixing site speed
- Is there a way to cache WordPress that does not loads core?
- Need to refresh page after each change
- leverage browser caching in wordpress
- WordPress varnish pages printed twice
- Feed cache fallback – A feed could not be found
- WordPress Userroles button getting cached
- How to let users clear their posts cache with WP Super Cache?
- String Replace Caching & Chance of Collisions
- Having 4000 posts, my site is so slow
- Super cache caches mobile pages for desktop
- Should I use transients for these API call results?
- cache reset button and question about deleting cache
- Cleared wp-cache and file is still not updated [closed]
- get_theme_mod returning cached values regardless of apache restart
- Caching with dynamic content
- Levels of caching and impact on the WordPress web site
- CSS changes not taking effect [closed]
- what is the cache directory for in my theme? (version control it?)
- To what degree can use of caching-plugins and a CDN boost WordPress performance? [closed]
- Multiple WordPress sites eat up a lot of RAM
- How to create a transient that persists the data for the whole duration of the expiration, even when object cache is enabled?