17 Mart 2017 Cuma

StackExchange.Redis performans problemi

.Net ortamında redis kullanacaksanız başvurabileceğiniz en güzel paketlerden biri de şüphesiz StackExchange.Redis.

Fakat dikkat etmeniz gereken önemli bir nokta var. ConnectionMultiplexer nesnesi. Maliyeti yüksek bir nesne olduğu için Static olaran kullanmanız. Initialization ını da static constructor ile yapmanız.

Aksi halde zaman içerisinde memory ve cpu problemleri yaşamanız muhtemel.

The central object in StackExchange.Redis is the ConnectionMultiplexer class in the StackExchange.Redis namespace; this is the object that hides away the details of multiple servers. Because the ConnectionMultiplexer does a lot, it is designed to be shared and reused between callers. You should not create a ConnectionMultiplexer per operation. It is fully thread-safe and ready for this usage. In all the subsequent examples it will be assumed that you have a ConnectionMultiplexer instance stored away for re-use. But for now, let's create one. This is done using ConnectionMultiplexer.Connect or ConnectionMultiplexer.ConnectAsync, passing in either a configuration string or a ConfigurationOptions object. The configuration string can take the form of a comma-delimited series of nodes, so let's just connect to an instance on the local machine on the default port (6379):


https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/Basics.md

TFS üzerinden dosyaları kalıcı olarak silme / TFS Permanently delete a file

TFS üzerinden dosyalarınızı kalıcı olarak silmek istiyorsanız şu adımları takip edebilirsiniz.

İlk olarak "Source Control Explorer" açıyoruz. Buradan silinen dosyaları görüntüle butonunu seçip silinen dosyaları göreceğiz.

Dosyanının yolunu buradan buluyoruz. Daha sonra Visual Studio Command Promt açıyoruz.





tf destroy $/RCWeb/RentacarssWeb/RC.Presentation.Map.WebUI/Content/global/ /login:adminkullanici@hotmail.com,sifreniz /collection:https://projeadi.visualstudio.com

Bu işlemden sonra yes / no diye soracaktır. (Eğer adresiniz, kullanıcı adınız, şifreniz ve yetkiniz doğru ise.)

Dosyalarınız TFS üzerinden kalıcı olarak silinmiştir.

Eğer aynı klasör ismi ile bir klasör açmaya çalıştığınızda hala "item name already exists on disk please enter another name" gibi bir hata alıyorsanız; Klasörü önce diskinizden silmelisiniz. Veri kaybı olmasın diye local klasörünüz silinmiyor. Bu işlemden sonra artık o klasörü yeniden de açmanız mümkün.