How to change frequency option for taxonomy term

<?php
function modulename_xmlsitemap_link_alter(&$link) {
  if ( $link['subtype'] == 'cust_cont_type' ) {
      $link['lastmod'] = 0;
      $link['changefreq'] = XMLSITEMAP_FREQUENCY_WEEKLY;
  }elseif ($link['type'] == 'taxonomy_term') {
        $link['lastmod'] = 0;
        $link['changefreq'] = XMLSITEMAP_FREQUENCY_HOURLY;
  }
}
?>

Or you can change frequency to 
XMLSITEMAP_FREQUENCY_ALWAYS
XMLSITEMAP_FREQUENCY_DAILY
XMLSITEMAP_FREQUENCY_HOURLY
XMLSITEMAP_FREQUENCY_MONTHLY
XMLSITEMAP_FREQUENCY_WEEKLY
XMLSITEMAP_FREQUENCY_YEARLY

How to change frequency option for nodes

<?php
function modulename_xmlsitemap_link_alter(&$link) {
  if ( $link['subtype'] == 'cust_cont_type' ) {
      $link['lastmod'] = 0;
      $link['changefreq'] = XMLSITEMAP_FREQUENCY_WEEKLY;
  }
}
?>

Or you can change frequency to 
XMLSITEMAP_FREQUENCY_ALWAYS
XMLSITEMAP_FREQUENCY_DAILY
XMLSITEMAP_FREQUENCY_HOURLY
XMLSITEMAP_FREQUENCY_MONTHLY
XMLSITEMAP_FREQUENCY_WEEKLY
XMLSITEMAP_FREQUENCY_YEARLY

How To Install and Use Memcache

Memcahced open source distributed memory object caching system it helps you to speeding up the dynamic web applications by reducing database server load. As your websites grow and see an increase in traffic, one of the components that shows stress the fastest is the backend database. If your database is not distributed and configured to handle high loads, it can easily be overwhelmed by a relatively modest increase in traffic.

How To Install and Configure Varnish

sudo apt-get update

sudo apt-get install varnish

 

Step Two—Configure Varnish

Once you have both apache and varnish installed, you can start to configure them to ease the load on your server from future visitors.

Varnish will serve the content on port 80, while fetching it from apache which will run on port 8080.

Let’s go ahead and start setting that up by opening the /etc/default/varnish file:

sudo nano /etc/default/varnish

How to Install Memcached For drupal 7

This is another great open source caching system which can dramatically increase your site’s performance by reducing database load.  By default Drupal saves cached information into database tables, which is great, but still requires Apache to hit the database to retrieve it. Memcached speeds things up by saving this information in RAM memory, which is significantly faster to access.

Run the following command lines to install the Memcached packages. You may already have some of these installed, but it doesn’t hurt to run them again.

Tags
Subscribe to