Keşfet

When using cache, does the cache item need to be explicitly saved in the 'get' callback?

XFdestek

Kurucu Üye
Katılım
25 May 2014
Mesajlar
4,482
Tepkime puanı
284
Konum
Türkiye
Web sitesi
fivetu.xyz
Using the example from @Jeremy P in
Lütfen içeriği görebilmek için Giriş yap yada Kayıt ol
about using the Symfony cache with XF 2.3, if we are using a callback to get the results if the cache key is not present or expired, do we need to explicitly save the item to cache in the callback function? Or do we need to do a 'getIem' & 'isHit' in combination with the callback? 🤔

In the quick test below, I'm always hitting the callback and am never hitting the cached copy.

Code:

Kod:
Lütfen içeriği görebilmek için Giriş yap yada Kayıt ol to view codes content!

Lütfen içeriği görebilmek için Giriş yap yada Kayıt ol
 

Konu görüntüleyen kullanıcılar

Geri
Üst Alt