What Is DNS Cache?

A DNS cache (sometimes referred to as a DNS resolver cache) is temporary info, maintained by a computer's OS, that contains records of all the recent visits and tried visits to websites and different internet domains.



In different words, a DNS cache is simply a memory of recent DNS lookups that your pc will quickly ask when it's attempting to work out a way to load a web site.

Most people only hear the phrase "DNS cache" once it refers to flushing/clearing the DNS cache so as to assist fix an internet connectivity issue. there is a lot of on that at the bottom of this page.

The Purpose of a DNS Cache

The internet depends on the domain name system (DNS) to maintain an index of all public websites and their corresponding IP addresses. you'll think of it as a phone book.

With a phone book, we do not need to memorize everyone's telephone number, that is the solely way phones can communicate: with a number. within the same way, DNS is used so we are able to avoid having to memorize each website's IP address, that is the solely way network equipment will communicate with websites.

This is what happens behind the curtain when you ask your browser to load a web site.

You type in a uniform resource locator like seocop.xyz and your browser asks your router for the IP address. The router contains a DNS server address stored, so it asks the DNS server for the IP address of that hostname. The DNS server finds the IP address that belongs to seocop.xyz and so is able to know what web site you are requesting, after that your browser will then load the suitable page.

This happens for each web site you wish to go to. whenever a user visits a web site by its hostname, the web browser initiates a request out to the web, however, this request can not be completed till the site's name is "converted" into an IP address.


The problem is that despite the fact that there are a lot of public DNS servers your network will use to try to speed up the conversion/resolution method, it's still faster to own a local copy of the "phone book," that is wherever DNS caches come into play.

The DNS cache tries to speed up the method even more by handling the name resolution of recently visited addresses before the request is distributed out to the web.

How a DNS Cache Works

Before a browser issues its requests to the outside network, the pc intercepts each and looks up the domain name within the DNS cache info. The info contains a list of all recently accessed domain names and also the addresses that DNS calculated for them the first time a request was made.

The contents of a local DNS cache will be viewed on Windows using the command ipconfig /displaydns, with results kind of like this:


In DNS, the "A" record is that the portion of the DNS entry that contains the ip address for the given hostname. The DNS cache stores this address, the requested web site name, and several|and several other} other parameters from the host DNS entry.

What Is DNS Cache Poisoning?

A DNS cache becomes poisoned or polluted when unauthorized domain names or IP addresses are inserted into it.

Occasionally a cache might become corrupted because of technical glitches or administrative accidents, however, DNS cache poisoning is usually related to pc viruses or different network attacks that insert invalid DNS entries into the cache.

Poisoning causes client requests to be redirected to the incorrect destinations, sometimes malicious websites or pages jam-packed with advertisements.

For example, if the docs.google.com record from above had a different "A" record, then once you entered docs.google.com in your browser, you would be taken elsewhere.

This poses a huge drawback for fashionable websites. If Associate in Nursing offender redirects your request for Gmail.com, as an example, to an internet site that appears like Gmail however is not, you may find yourself littered with a phishing attack like whaling.

DNS Flushing: What It does and how to try and do It

When troubleshooting cache poisoning or different internet connectivity problems, a pc administrator may need to flush (i.e. clear, reset, or erase) a DNS cache.

Since clearing the DNS cache removes all the entries, it deletes any invalid records too and forces your pc to repopulate those addresses the next time you are trying accessing those websites. These new addresses are taken from the DNS server your network is ready up to use.

So, to use the example above, if the Gmail.com record was poisoned and redirecting you to a weird web site, flushing the DNS may be a smart start to obtaining the regular Gmail.com back again.

In Microsoft Windows, you'll be able to flush the local DNS cache using the ipconfig /flushdns command in a command prompt. you know it works when you see the Windows ip configuration successfully flushed the DNS Resolver Cache or successfully flushed the DNS Resolver Cache message.

Through a command terminal, macOS users ought to use dscacheutil -flushcache, however, know that there's not a "successful" message when it runs, therefore you are not told if it worked. UNIX system users should enter the /etc/rc.d/init.d/nscd restart command.

A router will have a DNS cache similarly, that is why rebooting a router is usually a troubleshooting step. For a similar reason you may flush the DNS cache on your pc, you'll reboot your router to clear the DNS entries stored in its temporary memory.


spacer

Program to Swap Two Numbers in C++

This example contains two different techniques to swap numbers in C++. The first program uses a temporary variable to swap numbers, whereas the second program doesn't use temporary variables.



Example 1: Swap Numbers (Using Temporary Variable)


  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int a = 4, b = 10, temp;
  6. cout << "Before swapping." << endl;
  7. cout << "a = " << a << ", b = " << b << endl;
  8. temp = a;
  9. a = b;
  10. b = temp;
  11. cout << "\nAfter swapping." << endl;
  12. cout << "a = " << a << ", b = " << b << endl;
  13. return 0;
  14. }

Output

Before swapping.
a = 4, b = 10

After swapping.
a = 10, b = 4
To perform swapping in the above example, three variables are used.

The contents of the first variable are copied into the temp variable. Then, the contents of the second variable are copied to the first variable.

Finally, the contents of the temp variable are copied back to the second variable which completes the swapping process.

Example 2: Swap Numbers Without Using Temporary Variables.


  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int a = 4, b = 10;
  6. cout << "Before swapping." << endl;
  7. cout << "a = " << a << ", b = " << b << endl;
  8. a = a + b;
  9. b = a - b;
  10. a = a - b;
  11. cout << "\nAfter swapping." << endl;
  12. cout << "a = " << a << ", b = " << b << endl;
  13. return 0;
  14. }

Output

Before swapping.
a = 4, b = 10

After swapping.
a = 10, b = 4

Check out these related examples:



spacer

Find the non-repeating number in C++

Non-Repeating Element

c++


Find the first non-repeating element in a given array of integers.

Examples:

Input : -4 2 -4 3 2
Output : 3
Explanation : The first number that does not 
repeat is : 3

Input : 8 3 8 6 7 3
Output : 6

Code:

//Simple CPP program to find first non- repeating element.

#include <bits/stdc++.h>
using namespace std;

int nonRepeating(int arr[], int n)
{
for (int i = 0; i < n; i++) {
int j;
for (j = 0; j < n; j++)
if (i != j && arr[i] == arr[j])
break;
if (j == n)
return arr[i];
}
return -1;
}

int main()
{
int arr[] = { 8,3,8,6,7,3 };
int n = sizeof(arr) / sizeof(arr[0]);
cout << nonRepeating(arr, n);
return 0;
}


Output:
6
spacer

Top High PR Social Bookmarking Sites in 2019


Social Bookmarking sites are online services that allow you to store bookmarks on a cloud-based server, which you can access from anywhere. Users can register on the website to create bookmarks which they can ‘tag’ under various categories. Go through this free social bookmarking sites list 2019 below, these social bookmarking sites are of high DA and ‘can’ be helpful!

What is social bookmarking?

Social bookmarking is the technique to get good backlinks, huge traffic along with branding, promotion and indexing privileges. If you are an SEO or digital marketing guy, you must know about it.

Why use social bookmarking websites?

 You should begin with submitting blog posts or web pages to social sharing sites or social bookmarking sites (sob sites) as it has so many benefits.


  • Bookmarking is the fastest way to index your website or blog post in search engines- Google, Bing, Yahoo, etc.
  • Top bookmarking sites have high PR. If you have backing from them, you will get quality backlinks.
  • Submission to top social bookmarking sites helps to generate new relevant traffic.
  • By submitting on high PR bookmarking sites, your blog post can go viral.
  • It will improve your domain authority.
  • It will reduce the bounce rate.
  • It will help in blog categorization.
You can easily share your blog on the Social Bookmarking sites to generate user engagement. Each of these websites has a different atmosphere, vocabulary, and policies which you need to carefully understand before marketing your content.

High PR social bookmarking sites in 2019

Here I am sharing with you a high pr social bookmarking site list, mostly free bookmarking sites, which I am using regularly for my websites.

Download List From Here: Click Here


Bookmarking websitesPRDAAlexa
www.pinterest.com99878
www.reddit.com89817
www.tumblr.com810065
www.mix.com16115183
www.myspace.com8954526
www.citeulike.org87255288
www.Plurk.com7911600
www.Fark.com7806299
www.scoop.it7922431
www.bibsonomy.org77555876
www.diigo.com09219448
www.getpocket.com692836
www.folkd.com68771559
www.blinklist.com089160698
www.actweb-sport.com640191441
www.dzone.com6833103
www.twicsy.com56343352
www.kirtsy.com558229665
www.Dotnetkicks.com560195249
www.bizsugar.com569138884
www.trendiee.com036169278
www.inbound.org5341555350
www.lockerdome.com57293328
www.disqus.com9941312
www.list.ly57790722
www.slashdot.org7925299
www.digg.com7942489
www.aixindashi.org459226580
www.pearltrees.com6915226
www.feedly.com792569
www.bookmark4you.com365155345
www.airpim.biz430298103
www.dribbble.com792981
www.blogengage.com455148205
www.metafilter.com6807297
www.mendeley.com8784281
www.linkarena.com776179916
www.boingboing.net8915749
www.librarything.com88625365
www.techdirt.com78335901
www.instapaper.com68730205
www.wire19.com332371878
www.foursquare.com9922246
www.google.com/bookmarks9991
www.weheartit.com6983570
www.sociopost.com252227828
www.hubpages.com6919736
www.medium.com793227
www.viesearch.com461190118
www.blogmarks.net575227859
www.flipboard.com/7894657
www.whitelinks.com241339001
www.dailyhostnews.com539329429
www.sfcsf.org149172381
www.linkagogo.com/471152190
www.linkedin.com99828
www.activebookmarks.com140348825
www.techspy.com552144496
www.lymelightwebs.net450172565
www.wirefan.com452182815
www.linkarena.com776179916
www.quora.com79293
spacer