All Projects → saltun → sCache

saltun / sCache

Licence: other
Kolay PHP Cache sistemi sadece 1 satırda cache sisteminizi kurun.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to sCache

incache
Powerful key/value in-memory storage or on disk to persist data
Stars: ✭ 16 (-68%)
Mutual labels:  cache
component-box
A little component cacher 📦
Stars: ✭ 25 (-50%)
Mutual labels:  cache
ecommerce
(Live Link) Extensive ecommerce site with vendors, mods & ability to add to cart without being logged in. Check out v4!
Stars: ✭ 13 (-74%)
Mutual labels:  cache
Ccache.cmake
🚅 Compile faster with Ccache! A Ccache integration for CMake with Xcode support.
Stars: ✭ 24 (-52%)
Mutual labels:  cache
composer-install
A GitHub Action to streamline installation of PHP dependencies with Composer.
Stars: ✭ 151 (+202%)
Mutual labels:  cache
hitbox
A high-performance caching framework suitable for single-machine and for distributed applications in Rust
Stars: ✭ 61 (+22%)
Mutual labels:  cache
resilience4clj-circuitbreaker
Resilience4Clj circuit breaker lets you decorate a function call (usually with a potential of external failure) with a safety mechanism to interrupt the propagation of failures.
Stars: ✭ 40 (-20%)
Mutual labels:  cache
node-backend-template
A template for NodeJS backend projects
Stars: ✭ 19 (-62%)
Mutual labels:  cache
salad
Asynchronous Scala Redis Client supporting Sentinel and Redis Cluster
Stars: ✭ 14 (-72%)
Mutual labels:  cache
eloquent-cache
Easily cache your Laravel's Eloquent models.
Stars: ✭ 55 (+10%)
Mutual labels:  cache
cacheme-go
🚀 Schema based, typed Redis caching/memoize framework for Go
Stars: ✭ 19 (-62%)
Mutual labels:  cache
papercut
Papercut is a scraping/crawling library for Node.js built on top of JSDOM. It provides basic selector features together with features like Page Caching and Geosearch.
Stars: ✭ 15 (-70%)
Mutual labels:  cache
transitory
In-memory cache with high hit rates via LFU eviction for Node and browsers. Supports time-based expiration, automatic loading and metrics.
Stars: ✭ 24 (-52%)
Mutual labels:  cache
pacman.store
Pacman Mirror via IPFS for ArchLinux, Endeavouros and Manjaro
Stars: ✭ 65 (+30%)
Mutual labels:  cache
cachepot
cachepot is `sccache` with extra sec, which in turn is `ccache` with cloud storage
Stars: ✭ 106 (+112%)
Mutual labels:  cache
type-cacheable
TypeScript-based caching decorator (currently supports Redis, LRU-Cache and NodeCache)
Stars: ✭ 96 (+92%)
Mutual labels:  cache
elara
Elara DB is an easy to use, lightweight key-value database that can also be used as a fast in-memory cache. Manipulate data structures in-memory, encrypt database files and export data. 🎯
Stars: ✭ 93 (+86%)
Mutual labels:  cache
magento2-LiteSpeed LiteMage
LiteMage Cache Extension for Magento 2
Stars: ✭ 27 (-46%)
Mutual labels:  cache
stash
A Go package for disk-based blob cache
Stars: ✭ 14 (-72%)
Mutual labels:  cache
DTC
DTC is a high performance Distributed Table Cache system designed by JD.com that offering hotspot data cache for databases in order to reduce pressure of database and improve QPS.
Stars: ✭ 21 (-58%)
Mutual labels:  cache

sCache Class

Kolay kullanımlı PHP dosya cache sistemi

  • Sıkıştırma Özelliği
  • Load hesaplama özelliği
  • Belirlediğiniz sayfaları ön belleklemez ( options kısmına bakınız )
  • Dosya uzantısı ve dizin belirleme olanağı
  • Hızlı entegrasyon özelliği sadece sınıfı çağırmak yeterli.

Youtube üzeri anlatım ( eski sürüm / old versiyon and turkish ) => sCache Kullanımı

Redis Desteği ile kullanım => Döküman

2 Adımda Kurulum

sCache sınıfını sayfamıza dahil edelim.

require_once "sCache.php";

Sayfamızın en üst kısmın'da sCache'i çalıştıralım. eğer sayfanın en üstünde çalıştırmaz iseniz cache tam anlamı ile çalışmaz

$sCache = new sCache();

Tüm kurulum işlemi bu kadardır.

Notlar:

  • Eğer zaman değeri belirmez iseniz cache süreleri 60 saniyedir.
  • Eğer özel cache yolu belirtmez iseniz ana dizinde sCache dizin oluşturup içinde tutacaktır.
  • Cache adresleri md5 ile şifrelenip tutulmaktadır.
  • Eğer cache'e sıkıştırma özelliğini aktif etmez iseniz sıkıştırma yapmadan tutacaktır.
  • Eğer load özelliğini açmaz iseniz load değerleri gösterilmeyecektir. Ayarları düzenlemek için dizi olarak ayarları göndermeniz gerekir bunu nasıl yapacağınızı öğrenmek için alttaki dökümana bakınız.

Ayarlar ( Options )

Ayarları bir dizi halinde sınıfın başlangıcında göndermeniz gerekir göndere bileceğiniz değerler ise altta listelenmiştir

  • time = Cachenin tutulacağı süre değeri ( standart 60 saniye )
  • dir = Cache dosyalarınızın tutulacağı dizin adı. Yok ise otomatik oluşturulur ( standart sCache )
  • buffer = Oluşturulan cache dosyalarında sıkıştırılma yapılmasını ister iseniz true değerini göndermelisiniz ( standart kapalıdır )
  • load = Sayfanın load süresi yani açılma süresinin en altta görünmesini istiyor iseniz true değeri göndermelisiniz.
  • external = Cache harici sayfaları bir dizi olarak gönderir iseniz bu dosyalar cachelenmez. Şimdi yukarıdaki özelliklerin hepsini kullanarak örnek bir ayar dizini oluşturup gönderelim.
  • extension = Oluşturulacak cache dosyasının uzantısını belirleme olanağı sağlar eğer bir değer girmez iseniz standart olarak .html olarak oluşturacaktır.
$options = array(
	'time'   => 120, // 120 saniye yani 2 dakika
	'dir'    => 'sCache2', // sCache2 klasörü oluşturup buraya yazılsın.
	'buffer' => true, // html sayfalarımızın sıkıştırılmasını aktif edelim.
	'load'   => true,  // sayfamızın sonunda load değerimiz görünsün.
	'external'=>array('nocache.php','nocache2.php'), // Burada belirttiğiniz sayfalar ( dosyalar ) cachelenmez.,
	'extension' => ".scache", // standart değer .html olarak ayarlanmıştır cache dosyalarınızın uzantısını temsil etmektedir.
	);

$sCache = new sCache($options); // ayarları sınıfımıza gönderip sınıfı çalıştıralım.

Cache sistemini kapatma

Cache sisemini kapatmak isterseniz ayarlar değişkeninden sonra 2. değer olarak false değerini gönderir iseniz cache sistemi aktif olmayacaktır. ( example3.php)

$sCache = new sCache($options,false);

Tüm Cache dosyalarını temizleme

clearCache fonksiyonunu çalıştırdığınız zaman cache'de belirtilen dizindeki tüm cache dosyaları silinir eğer standart dizin dışında farklı bir dizinde cache dosyalarınızı tutuyor iseniz ayarları göndermeyi unutmayınız.

$sCache->clearCache();

Author : Savaş Can Altun Mail : [email protected] Web : http://savascanaltun.com.tr

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].