Azure cache on the local host

I am developing an application to run in azure. I use azure cache, however, when I run it locally, I don’t want to connect to Azure to use the cache because it is a bit slow and tedious.

Can I run the cache locally?

[EDIT] This is .Net C #

+4
source share
6 answers

Unfortunately, you need to connect to the azure screen to check the caching service of the azure window. Read this for more information: http://msdn.microsoft.com/en-us/library/windowsazure/gg278342.aspx

+2
source

For local debugging, you can use the AppFabric cache for Windows Server. It uses a very similar configuration and program mode, which means that almost all you need to change is the cache IP address and access token.

But I'd rather create a separate Cache layer to isolate cache operations. For example, it implements the ICache interface using the Add, Get, Remove methods, etc. Then you can implement Azure Cache, Memcached, In-Proc Cache, etc. In different cases.

For a good level of cache that might interest you, check out the ServiceStack project on GitHUB https://github.com/ServiceStack/ServiceStack/tree/master/src/ServiceStack.Interfaces/CacheAccess

+2
source

It's impossible. To use azure locally to cache windows, you always need to redirect the request to azure, which adds a serious delay on top of the request.

To check the properties of your cache, you need to deploy your service in azure.

As others have said, you can use Windows Server AppFabric caching locally, but be careful, there are some differences between Windows Server AppFabric caching and the Windows Azure caching service, for example, identity-based invalidation for local cache elements is not supported in azure. Be sure not to use any of these features when developing locally, or you may be surprised to deploy the service in the cloud.

For the window caching service, only support for time-based invalidation in the local cache is supported. The azure caching service for Windows is intended for use in your cloud services, so it makes sense to resort to using it when used on a local application.

+2
source

Caching Azure AppFabric uses a subset of the caching functionality of Windows Server AppFabric . If you want to configure the server in the house with the cache installed, you can probably get something comparable to using the Azure cache. I have not tried this myself, therefore, although I know that the code you need to write is more or less the same between the two, I'm not sure how different the configurations should be.

Most likely, it will be much less time and effort to just use the Azure cache.

+1
source

This article specifically talks about what you are trying to do. Create a caching "infrastructure" that switches between local and distributed cache based on configuration (s):

http://msdn.microsoft.com/en-us/magazine/hh708748.aspx

+1
source

Now you can use azure in-role cache and try locally with the emulator

+1
source

Source: https://habr.com/ru/post/1399233/


All Articles