I want to display some information from database in each post, for example date of registration of user and user role etc. It is quite static data that doesn't change.
Now if I make a query to the database to get the above data, the post loop will fetch that data from database for each post (for example if a user has 20 posts on a page, it will fetch the very same data 20 times).
Is there a way to optimize this, to cache somehow?
Note: The is not about the loop or any cache plugin, just in general if some static query data can be optimized.