# 캐시

### 캐싱 정책 (Caching)

Weekerp CDN은 **최초 요청된 이미지를 변환 후 1년간 캐싱**합니다.\
동일한 요청(URL 및 파라미터)이 반복되면,\
이미 변환된 캐시 이미지를 즉시 서빙하여 속도를 극대화합니다.

***

#### 캐시 유효기간

* 변환된 이미지는 **최대 1년간** CDN 엣지 서버에 저장됩니다.
* 동일한 URL·파라미터 조합은 항상 같은 캐시를 참조합니다.
* 만료 이후 첫 요청 시 자동으로 재생성되어 캐시가 갱신됩니다.

***

#### 캐시 키 기준

* 캐시는 **요청 경로 + 파라미터 전체**를 기준으로 구분됩니다.
* 아래 두 요청은 서로 다른 캐시로 처리됩니다:

```
/image/cat.jpg?w=800
/image/cat.jpg?w=800&fit=cover
```

***

#### 캐시 퍼지(Cache Purge)

* 현재는 **공식적인 캐시 퍼지 기능을 제공하지 않습니다.**
* 다만, 긴급히 캐시 삭제가 필요할 경우 [도움이 필요해요](/image/ko/quick/support.md)로 문의하시면 수동 지원이 가능합니다.

***

#### 버저닝(Versioning) 권장

캐시 퍼지 대신, 이미지 URL에 버전 파라미터를 추가하면\
동일한 효과를 얻을 수 있습니다.

```
/image/cat.jpg?w=800&v=2
```

> `v` 값이 변경되면 완전히 새로운 캐시로 인식되어,\
> 기존 캐시를 건드리지 않고 즉시 최신 이미지가 배포됩니다.

***

> 💡 **Tip:**\
> `v=timestamp` 혹은 빌드 버전 등을 활용하면\
> 릴리즈 시점마다 안전하게 캐시를 갱신할 수 있습니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://weekerp.gitbook.io/image/ko/resources/cache.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
