Partial Caching with PageBuilder Engine

Steve·2022년 9월 2일
0

부분 캐싱

cachedCall

The fetch function will now be called with the query parameter and an object with a cachedCall function.

질문해볼만한거?

데이터 불러오기가 이번 subtitle할 때 사용이 되는데, 조선비즈식으로 커스터마이징 돼있어서 문제 파악하고 있느라 시간이 조금 걸리고 있다.

(one for the cachedCall and one for the entire content source).

query가 새로 생김

query can be a string or a JSON object. It is always passed as a parameter to the fn and has a default value of {}. If it is a string, it will be used as the cached key. If it is a JSON object, the cache key will be generated using both the name and the query. When it is an object and it doesn't contain an arc-site attribute, the parent content source's arc-site parameter will be added to it.
"요약: 만약 query가 스트링이면 캐시 키가 될것이고, JSON object이면 name과 query를 이용해서 캐시 키가 생성될것이다."

The key thing to note here is the independent: true on the cachedCall for section data.

Should I use cachedCall for every HTTP request in my fetch content source?
아니다. 다른 컨텐츠 소스와 캐시를 공유할때만 또는 다른 ttl을 가지고 있을때. (ttl: time to live)

How can I share cache with a resolve content source?
Pass the final url as the query value.

Reuse generated credentials across multiple content source calls.
Share cache across different content sources.
Assign different expirations for different HTTP calls within a fetch content source.
Retain cache for HTTP calls even after the content source's cache has been cleared.

api통해서 가져오고있다.

charbeat랑 똑같은 원리다

기사원본자체가 수정이 됐을때만 작동을 하는건지,
제목수정을 많이함(편집용)

section에서 override한다 에서 section이 페이지빌더의 왼쪽을 말하는건가?

content-api-by-id.js 저걸 많이 쓰고 있음.
story-card-by-id.js
저거만 해결하면 cachecall 해결?

const resolve

이 캐싱을 적용을 했을 때 실제로 동작이 잘 되고 있는지 어떤식으로 테스트를 할 수 있는지 질문.

블록 단위로 하면 해결되는지, 컨텐츠 바이 아이디 에서만 바꾸면 일괄적용 되는건지.

resolve content sources
fetch content sources

기본 설정 2분,
ttl을 설정해서 퍼포먼스적으로 효과가 있는지.

블록, 피처랑 같은 말이다.


8.24 partial caching

axios를 안사용해도되ㅣ는지 .예스

profile
Front-Dev

0개의 댓글