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?
- How well does WordPress scale?
- 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
- Best way to show Dynamic Content on a Cached WordPress Site?
- What is the best caching option for WordPress multi-site on non-shared hosting?
- Is define(‘WP_CACHE’, true) needed for object caching?
- Prevent WordPress from sending Cache-control http header
- 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?
- Configuring WordPress for Amazon CloudFront Caching?
- Nginx FastCGI_Cache Vs PHP Caching
- 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)
- Multiple WordPress sites eat up alot of RAM
- What exactly is an advanced object cache?
- Using a wildcard with delete_transient()
- Should I use Transients with W3 Total Cache APC Caching? [closed]
- WordPress Browser Cache with W3-Total-Cache doesn’t show new posts [closed]
- Does a low traffic WordPress site need a caching plugin and a CDN
- Automatically Refresh WordPress Stylesheet
- wp_cache_set() or wp_cache_add()
- How to use cache with simplepie
- Fragment caching increasing database queries
- How can I reduce the number of database query calls for this custom homepage?
- Any reason why wp_cache_set not to work?
- Can I force get_option to go back to the DB instead of cache?
- Which WordPress pages/URLs should never be cached?
- How to archive a wordpress site (make it read only)
- Extremely slow WordPress website with 6000 posts
- How to purge all transient caches?
- Stale cache handling with a persistent object cache
- Varnish + W3 Total Page Cache [closed]
- Are there any server requirements for WordPress transients to work properly?
- Writing a cache manifest file for a WordPress blog (app cache, offline web applications)
- W3 Total Cache doesn’t detect memcached [closed]
- Settings to get the most out of W3 Total Cache
- How to force content refresh of a page that has been loaded previously by the user? [closed]
- Help Pinpointing Source of Caching Issue
- How to clear cache without a plugin [closed]
- can’t see live version of style.css – is it web server caching?
- 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]
- Speed up WordPress
- wp-super-cache exclude file from caching
- APC object caching in combination Batcache/memcached page caching?
- Should the page cache be refreshed often? [closed]
- WordPress caching in development
- Plugin a specific cache functionality?
- What is difference between ‘Page Cache’ and ‘Object Cache’ in WordPress?
- W3 total Cache – Site with query strings
- Possible to configure nginx to ignore cache for logged in users in certain roles only?
- Check if a user is connected and get is ID without fully loading wordpress
- Should I enable FastCGI on WordPress?
- Programmatically insert hierarchical terms & set terms for post causes glitch? [duplicate]
- Will caching WordPress affect session variables, custom filed updates and displaying images from a non wordpress table?
- Getting soft 404 errors (200 status) when caching plugins are enabled
- How to totally disable cache in WordPress?
- Automatically enabled caching in some hosting companies w/o visible plugin (Must use plugin)
- Database Cache and Object Cache Difference?
- Register script version not showing
- How to purge all transient caches?
- W3 Total Cache plugin integration
- How many caching plugins should be used?
- When use a cache system with WordPress
- Is using WP Transients to save external data for a plugin the best/right way?
- server load. $_SERVER[‘REMOTE_ADDR’] and $_SERVER[‘HTTP_HOST’] [closed]
- Is it possible to save an entire piece of rendered HTML in a transient?
- Execute a piece of code also when the cached version of a page is served
- Method to make definitively static an abandoned WP blog
- How do I fetch feed info from cache instead of directly from feed?
- pass-protected pages and posts not protected after enter them 1 time
- Can a WordPress blog be entirely hosted on a CDN if cached?
- Static HTML page caching for large website [closed]
- WordPress Caching On Demand
- To have WordPress interact with memcached it must be installed as a PHP extension?
- Transients are not expiring as expected in simple custom plugin
- WordPress caching issue
- Prevent installation of style.css cookies and file caching
- Correct way to perform non-cacheable DB query
- How can I revert to showing cached pages when no database connection is available? [closed]
- WP Super Cache Bug with Ubermenu
- How to speed up my site [duplicate]
- Problem with caching, W3TC [closed]
- Headway body classes and W3TC page cache conflict [closed]
- Is the object cached?