Skip to content

Commit 587d63b

Browse files
committedFeb 7, 2015
Merge pull request #24 from Rastignac/patch-1
Update cache.md
2 parents 7e68121 + 1ed5c2f commit 587d63b

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed
 

‎cache.md

+40-40
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,140 @@
11
# Cache
22

3-
- [Configuration](#configuration)
4-
- [Cache Usage](#cache-usage)
5-
- [Increments & Decrements](#increments-and-decrements)
6-
- [Cache Tags](#cache-tags)
7-
- [Database Cache](#database-cache)
3+
- [Yapılandırma](#configuration)
4+
- [Önbellekleme Kullanımı](#cache-usage)
5+
- [Arttırma & Azaltma](#increments-and-decrements)
6+
- [Önbellek Etiketleri (Tags)](#cache-tags)
7+
- [Veritabanı Önbelleği](#database-cache)
88

99
<a name="configuration"></a>
10-
## Configuration
10+
## Yapılandırma
1111

12-
Laravel provides a unified API for various caching systems. The cache configuration is located at `config/cache.php`. In this file you may specify which cache driver you would like used by default throughout your application. Laravel supports popular caching backends like [Memcached](http://memcached.org) and [Redis](http://redis.io) out of the box.
12+
Laravel, çeşitli önbellekleme sistemleri için tümleşik bir API sağlar. Önbellekleme yapılandırma ayarları `config/cache.php` dosyasında bulunmaktadır. Bu dosyada uygulamanızda varsayılan olarak hangi önbellekleme sürücüsünü kullanmak istediğinizi belirtebilirsiniz. Laravel, [Memcached](http://memcached.org) ve [Redis](http://redis.io) gibi popüler önbellekleme sürücülerini barındırır.
1313

14-
The cache configuration file also contains various other options, which are documented within the file, so make sure to read over these options. By default, Laravel is configured to use the `file` cache driver, which stores the serialized, cached objects in the filesystem. For larger applications, it is recommended that you use an in-memory cache such as Memcached or APC. You may even configure multiple cache configurations for the same driver.
14+
Önbellekleme yapılandırma dosyası ayrıca dosyanın içinde açıklanmış çeşitli seçenekleri de içerir, bu yüzden o seçenekleri de okuduğunuzdan emin olun. Varsayılan olarak, Laravel, serileştirilerek önbelleklenmiş öğeleri dosya sisteminde depolayan `file` (dosya) önbellekleme sürücüsünü kullanmak üzere ayarlanmıştır. Daha büyük uygulamalar için, Memcached ve APC gibi bir önbellekleme uygulaması kullanmanız önerilir.
1515

16-
Before using a Redis cache with Laravel, you will need to install the `predis/predis` package (~1.0) via Composer.
16+
Laravel ile Redis Önbellekleme kullanmadan önce, Composer ile `predis/predis` (~1.0) pakedini yüklemeniz gerekir.
1717

1818
<a name="cache-usage"></a>
19-
## Cache Usage
19+
## Önbellekleme Kullanımı
2020

21-
#### Storing An Item In The Cache
21+
#### Bir Öğeyi Önbelleğe Koymak
2222

2323
Cache::put('key', 'value', $minutes);
2424

25-
#### Using Carbon Objects To Set Expire Time
25+
#### Son Kullanım Zamanını Ayarlamak İçin Carbon Nesneleri Kullanılması
2626

2727
$expiresAt = Carbon::now()->addMinutes(10);
2828

2929
Cache::put('key', 'value', $expiresAt);
3030

31-
#### Storing An Item In The Cache If It Doesn't Exist
31+
#### Eğer Öğe Önbellekte Yoksa, Öğeyi Önbelleğe Koymak
3232

3333
Cache::add('key', 'value', $minutes);
3434

35-
The `add` method will return `true` if the item is actually **added** to the cache. Otherwise, the method will return `false`.
35+
Eğer ilgili öğe önbelleğe gerçekten eklenirse `add` metodu `true` döndürecektir. Aksi takdirde bu metod `false` döndürecektir.
3636

37-
#### Checking For Existence In Cache
37+
#### Öğenin Önbellekte Var Olup Olmadığını Kontrol Etmek
3838

3939
if (Cache::has('key'))
4040
{
4141
//
4242
}
4343

44-
#### Retrieving An Item From The Cache
44+
#### Önbellekten Bir Öğeyi Almak
4545

4646
$value = Cache::get('key');
4747

48-
#### Retrieving An Item Or Returning A Default Value
48+
#### Bir Önbellek Değeri Almak Veya Varsayılan Bir Değer Döndürmek
4949

5050
$value = Cache::get('key', 'default');
5151

5252
$value = Cache::get('key', function() { return 'default'; });
5353

54-
#### Storing An Item In The Cache Permanently
54+
#### Bir Öğeyi Önbelleğe Kalıcı Olarak Koymak
5555

5656
Cache::forever('key', 'value');
5757

58-
Sometimes you may wish to retrieve an item from the cache, but also store a default value if the requested item doesn't exist. You may do this using the `Cache::remember` method:
58+
Bazen, önbellekten bir öğeyi almak isteyebilir ve ayrıca talep edilen öğe yoksa önbellekte varsayılan bir değer saklayabilirsiniz. Bunu, `Cache::remember` metodunu kullanarak yapabilirsiniz:
5959

6060
$value = Cache::remember('users', $minutes, function()
6161
{
6262
return DB::table('users')->get();
6363
});
6464

65-
You may also combine the `remember` and `forever` methods:
65+
Ayrıca, `remember` ve `forever` methodlarını birlikte kullanabilirsiniz.
6666

6767
$value = Cache::rememberForever('users', function()
6868
{
6969
return DB::table('users')->get();
7070
});
7171

72-
Note that all items stored in the cache are serialized, so you are free to store any type of data.
72+
Önbellekte bütün öğelerin serileştirilmiş şekilde saklandığını unutmayın, yani her türlü veriyi saklayabilirsiniz.
7373

74-
#### Pulling An Item From The Cache
74+
#### Önbellekten Bir Öğe Çekilmesi
7575

76-
If you need to retrieve an item from the cache and then delete it, you may use the `pull` method:
76+
Eğer önbellekten bir öğeyi elde etmek ve sonra da onu silmeniz gerekirse, `pull` metodunu kullanabilirsiniz:
7777

7878
$value = Cache::pull('key');
7979

80-
#### Removing An Item From The Cache
80+
#### Önbellekten Bir Öğeyi Silmek
8181

8282
Cache::forget('key');
8383

8484
<a name="increments-and-decrements"></a>
85-
## Increments & Decrements
85+
## Arttırma & Azaltma
8686

87-
All drivers except `file` and `database` support the `increment` and `decrement` operations:
87+
`file` ve `database` hariç tüm sürücüler `increment` (artırma) ve `decrement` (azaltma) işlemlerini destekler:
8888

89-
#### Incrementing A Value
89+
#### Bir Değeri Arttırmak
9090

9191
Cache::increment('key');
9292

9393
Cache::increment('key', $amount);
9494

95-
#### Decrementing A Value
95+
#### Bir Değeri Azaltmak
9696

9797
Cache::decrement('key');
9898

9999
Cache::decrement('key', $amount);
100100

101101
<a name="cache-tags"></a>
102-
## Cache Tags
102+
## Önbellek Etiketleri (Tags)
103103

104-
> **Note:** Cache tags are not supported when using the `file` or `database` cache drivers. Furthermore, when using multiple tags with caches that are stored "forever", performance will be best with a driver such as `memcached`, which automatically purges stale records.
104+
> --Not:** Önbellek bölümleri `file` ve `database` önbellekleme sürücüleri kullanılırken desteklenmemektedir. Ayrıca, "forever" saklanır önbelleklerde birden çok tag kullanmanız halinde, bayat kayıtları otomatik olarak temizleyen `memcached` gibi bir sürücüyle performans en iyi olacaktır.
105105
106-
#### Accessing A Tagged Cache
106+
#### Etiketlenmiş Bir Önbelleğe Erişim
107107

108-
Cache tags allow you to tag related items in the cache, and then flush all caches tagged with a given name. To access a tagged cache, use the `tags` method.
108+
Cache tagları cache'deki birbirine yakın öğeleri etiketlemenize ve daha sonra verilen bir isimle etiketlenmiş tüm cache'leri yok etmenize (flush) imkan verir. Etiketlenmiş bir cache'e erişmek için, `tags` metodunu kullanın:
109109

110-
You may store a tagged cache by passing in an ordered list of tag names as arguments, or as an ordered array of tag names:
110+
Parametreler olarak sıralı bir tag isimleri listesi geçerek veya parametre olarak sıralı tag isimlerinden oluşan bir dizi geçerek etiketlenmiş bir cache saklayabilirsiniz:
111111

112112
Cache::tags('people', 'authors')->put('John', $john, $minutes);
113113

114114
Cache::tags(array('people', 'artists'))->put('Anne', $anne, $minutes);
115115

116-
You may use any cache storage method in combination with tags, including `remember`, `forever`, and `rememberForever`. You may also access cached items from the tagged cache, as well as use the other cache methods such as `increment` and `decrement`.
116+
Tag kombinasyonlarında `remember`, `forever` ve `rememberForever` gibi herhangi bir cache saklama metodunu kullanabilirsiniz. Ayrıca etiketlenmiş cache'lerde önbelleklenmiş öğelere erişebileceğiniz gibi, `increment` ve `decrement` gibi diğer önbellek metodlarını da kullanabilirsiniz.
117117

118-
#### Accessing Items In A Tagged Cache
118+
#### Etiketlenmiş Bir Önbellekteki Öğelere Erişmek
119119

120-
To access a tagged cache, pass the same ordered list of tags used to save it.
120+
Etiketlenmiş bir cache'ye erişmek için, onu saklarken kullandığınız aynı sıradaki tag listesini geçiniz.
121121

122122
$anne = Cache::tags('people', 'artists')->get('Anne');
123123

124124
$john = Cache::tags(array('people', 'authors'))->get('John');
125125

126-
You may flush all items tagged with a name or list of names. For example, this statement would remove all caches tagged with either `people`, `authors`, or both. So, both "Anne" and "John" would be removed from the cache:
126+
Bir isim veya bir isim listesi ile etiketlenmiş tüm ögeleri yok edebilirsiniz. Örneğin, aşağıdaki cümle `insanlar`, `yazarlar` veya her ikisi ile de etiketlenmiş tüm cache'leri çıkarıp atacaktır. Dolayısıyla, cache'den hem "Mine" hem de "Can" çıkartılacaktır:
127127

128128
Cache::tags('people', 'authors')->flush();
129129

130-
In contrast, this statement would remove only caches tagged with `authors`, so "John" would be removed, but not "Anne".
130+
Tersine, şu cümle sadece `yazarlar` etiketi verilmiş cache'leri çıkartacaktır, yani "Can" çıkartılacak ama "Mine" çıkartılmayacak.
131131

132132
Cache::tags('authors')->flush();
133133

134134
<a name="database-cache"></a>
135-
## Database Cache
135+
## Veritabanı Önbelleği
136136

137-
When using the `database` cache driver, you will need to setup a table to contain the cache items. You'll find an example `Schema` declaration for the table below:
137+
`database` önbellek sürücüsü kullandığınız takdirde, önbellek öğelerini içeren bir tablo kurulumu gerekir. Bu tablo için örnek bir `şema` aşağıda gösterilmiştir:
138138

139139
Schema::create('cache', function($table)
140140
{

0 commit comments

Comments
 (0)