# Purging

Temizleme, önbelleği geçersiz kılmanın en kolay yoludur. Aşağıdaki örnekte, VCL'de **vcl\_recv** alt yordamının içinden bir dönüş (**purge**) gerçekleştirebileceğinizi görebilirsiniz. Bu nesneyi önbellekten çıkarır. Nesne, **vcl\_hash**'da belirtilen kriterler ile tanımlanacaktır, bu nedenle varsayılan olarak alan adı ve URL'dir.

```c
acl purge {
  "localhost";
  "192.168.55.0"/24;
}

sub vcl_recv {
  # allow PURGE from localhost and 192.168.55...
  if (req.method == "PURGE") {
      if (!client.ip ~ purge) {
          return(synth(403,"Not allowed."));
      }
      return (purge);
  }
}
```

Doğru bir şekilde yapmak için bir ACL uygulayarak yetkisiz temizleme isteklerine karşı önlem alıyoruz. Yalnızca localhost'tan veya 192.168.55.0/24 alt ağından gelen temizleme işlemlerine izin verilir. Ve sonra kontrol edilen PURGE istek yöntemi var. Kaynağı GET yerine PURGE ile talep ederek, temelde Varnish'e, bu HTTP isteğinin normal bir veri alma talebi değil, bir temizleme isteği olduğunu söylüyorsunuz. Örnek istek:

```bash
curl -X PURGE http://localhost/ornek-yazi
```


---

# 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://oguzhaninan.gitbook.io/varnish-cache/oenbellegi-gecersiz-kilma/purging.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.
