Çeviri Cache Temizle
Çeviri cache'lerini temizler.
Endpoint
POST /api/v1/cache/clear-translation
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Permission
cache.clear.translation- Çeviri cache temizleme
Request
Headers
| Header | Değer | Zorunlu |
|---|---|---|
Authorization | Bearer \{token\} | Evet |
Content-Type | application/json | Evet |
Request Body (Opsiyonel)
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
locale | string | Hayır | Dil kodu (belirli bir dil için) |
key | string | Hayır | Çeviri anahtarı (belirli bir key için) |
Example Request (Belirli Locale)
{
"locale": "tr"
}
Example Request (Belirli Key)
{
"locale": "tr",
"key": "pages.home"
}
Example Request (Tüm Çeviri Cache'leri)
{}
Response
Success Response (200 OK)
{
"message": "Translation cache cleared successfully",
"locale": "tr",
"key": "pages.home"
}
Error Responses
403 Forbidden
{
"message": "Forbidden"
}
Code Examples
cURL - Belirli Locale
curl -X POST https://api.example.com/api/v1/cache/clear-translation \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"locale": "tr"
}'
cURL - Belirli Key
curl -X POST https://api.example.com/api/v1/cache/clear-translation \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"locale": "tr",
"key": "pages.home"
}'
cURL - Tüm Çeviri Cache'leri
curl -X POST https://api.example.com/api/v1/cache/clear-translation \
-H "Authorization: Bearer \{token\}"
Notes
- Parametre yoksa tüm çeviri cache'leri temizlenir
localeparametresi ile belirli bir dil için tüm cache'ler temizlenirlocalevekeybirlikte kullanılırsa belirli bir çeviri cache'i temizlenir- Çeviriler 24 saat cache'lenir, bu endpoint ile manuel temizlenebilir
Related Endpoints
- Para Birimi Cache Temizle - Para birimi cache'lerini temizle
- Tüm Cache'i Temizle - Tüm cache'i temizle