Storing a request in a variable resource server resource?

0

Using Wordpress I will need to use the article link more than once, I wanted to know if storing 'permalink' in a variable resource server resource, since I will only do one request to the database or there is an expense to process What does not make up?

Ex:

$post_url = get_permalink();

// To get the URL and store in a variable

echo $post_url;  

// To use it

PS: I'll use the link 4 times.

    
asked by anonymous 08.10.2014 / 18:39

1 answer

2

Without a doubt, you will reduce calls to the Bank and the objects in TheLoop using a variable, and there will be minimal processing / server resource saving. Although this economy is small, any economy is welcome, especially with a clean code like this (IMO).

    
09.10.2014 / 21:36