# Cache (Önbellek) Ekleme

Sitenize cache (önbellek) sistemi ekleyerek daha hızlı açılma hızı elde edebilirsiniz. Önceden bu sistem hazır olarak geliyordu fakat bir çok müşteri bu sistemde sorun yaşadığı için kaldırdık. Artık sadece bu konu hakkında bilgi sahibi kişiler bu sistemi kullanabilecek.

Cache hakkında bilgi almak için: <https://www.isimtescil.net/bilgibankasi/cache-nedir>

#### Cache sistemini LeaderOS v5'e nasıl kurabilirim?

Öncelikle web hosting FTP sunucunuza bağlanıp ana dizindeki `.htaccess` dosyasını düzenle diyoruz. Daha sonra size aşağıda verdiğim kodu `.htaccess` dosyasındaki `## CACHE KODUNU BUNUN ALTINA EKLEYEBILIRSINIZ ##` yazısının altına ekliyoruz ve dosyayı kaydediyoruz.

#### Kod:

```
## EXPIRES CACHING ##
<IfModule mod_expires.c>
	ExpiresActive On
	ExpiresByType image/jpg "access 1 year"
	ExpiresByType image/jpeg "access 1 year"
	ExpiresByType image/gif "access 1 year"
	ExpiresByType image/png "access 1 year"
	ExpiresByType text/css "access 1 month"
	ExpiresByType text/html "access 1 month"
	ExpiresByType application/pdf "access 1 month"
	ExpiresByType text/x-javascript "access 1 month"
	ExpiresByType application/x-shockwave-flash "access 1 month"
	ExpiresByType image/x-icon "access 1 year"
	ExpiresDefault "access 1 month"
</IfModule>

## CACHE CONTROL ##
<IfModule mod_headers.c>
	# 1 Month for most static assets
	<FilesMatch ".(css|jpg|jpeg|png|gif|js|ico)$">
		Header set Cache-Control "max-age=2592000, public"
	</FilesMatch>
</IfModule>
```

Cache (önbellek) sisteminiz bu işlemden sonra başarılı bir şekilde kurulacaktır. Bundan sonra herhangi bir resim, css, js dosyasında değişiklik yaptığınızda sitenize tarayıcıdan girip `SHIFT+F5` kombinasyonu ile cache temizliği yapmanız gerekiyor. (Eğer Cloudflare kullanıyorsanız Cloudflare paneli üzerinden cache temizlemeyi unutmayın) Bu kombinasyon ile güncel dosyaları görüntüleyebilirsiniz. Eğer halen bu dosyalar güncellenmediyse [bu yazımızdan](https://egitim.leaderos.web.tr/soru-cevap#sitemdeki-fotograflar-guencellenmiyor-nasil-coezerim) yardım alabilirsiniz.


---

# 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://egitim.leaderos.com.tr/cache-oenbellek-ekleme.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.
