Cache Flashcards

1
Q

Which PSR does Cache-Component follow?

A

PSR-6 & PSR-16

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

Which interfaces/classes does the PSR-6 Cache-Component include?

A
  • CacheException
  • CacheItemInterface
  • CacheItemPoolInterface
  • InvalidArgumentException
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How will a value be set for a cache-item?

A

Within the method “get”

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

How will a value be selected for a cache-item?

A

Within the method “get”

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

What is stampede protection?

A

Protecting cold cache from being written by multiple clients at a time

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

What are the 2 ways of symfony’s stampede protection?

A
  1. lock
  2. refresh before expiring
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Whats the difference between PSR-6 and PSR-16?

A

PSR-16 is the simplified and more performant way of caching, while PSR-6 allows more complex possibilities for caching (e.g. getItem, getDeferred etc.)

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

Which Interfaces / Classes do the cache-contracts (PSR-16) include?

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