TTL And Invalidations Flashcards

1
Q

What is TTL (Time-to-Live)?

A

TTL is a setting that determines how long content (like web pages, images, and other files) is stored in a cache before it is considered stale and needs to be refreshed from the origin server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is TTL important in content delivery?

A

TTL helps balance between reducing load on the origin server and ensuring that users receive the most up-to-date content. It optimizes both performance and resource usage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are invalidations?

A

Invalidation is a process used in content delivery networks to remove files from a cache before the end of their configured TTL. This forces the next request for these files to be served from the origin server, ensuring that updated content is delivered.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When should invalidations be used?

A

Invalidations are typically used when you need to urgently replace cached content with updated versions, such as after fixing errors in content or updating critical information on a website.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does Cache-Control: max-age specify?

A

It sets the maximum age in seconds that a resource can be considered fresh and served from the cache.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does Cache-Control: s-maxage control?

A

It sets how long (in seconds) a shared cache (like a CDN) can keep the content before it needs to be revalidated or fetched again.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the Expires header do?

A

It specifies the exact time after which the content is considered outdated and must be fetched anew from the source.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly