পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Saturday, March 11, 2017

RESTful Web Services - Caching

Caching refers to storing the server response in the client itself, so that a client need not make a server request for the same resource again and again. A server response should have information about how caching is to be done, so that a client caches the response for a time-period or never caches the server response.

Following are the headers which a server response can have in order to configure a client's caching −
Sr.No. Header & Description
1
Date
Date and Time of the resource when it was created.
2
Last Modified
Date and Time of the resource when it was last modified.
3
Cache-Control
Primary header to control caching.
4
Expires
Expiration date and time of caching.
5
Age
Duration in seconds from when resource was fetched from the server.

Cache-Control Header

Following are the details of a Cache-Control header −
Sr.No. Directive & Description
1
Public
Indicates that resource is cacheable by any component.
2
Private
Indicates that resource is cacheable only by the client and the server, no intermediary can cache the resource.
3
no-cache/no-store
Indicates that a resource is not cacheable.
4
max-age
Indicates the caching is valid up to max-age in seconds. After this, client has to make another request.
5
must-revalidate
Indication to server to revalidate resource if max-age has passed.

Best Practices

  • Always keep static contents like images, CSS, JavaScript cacheable, with expiration date of 2 to 3 days.
  • Never keep expiry date too high.
  • Dynamic content should be cached for a few hours only.
Best practices for Cache-Control

No comments:

Post a Comment