Created
July 2, 2012 14:14
-
-
Save Blackmist/3033464 to your computer and use it in GitHub Desktop.
Windows Azure Caching snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="" /> | |
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.Loglevel" value="" /> | |
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30" /> | |
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<InternalEndpoint name="memcache_default" protocol="tcp"> | |
<FixedPort port="11211"/> | |
</InternalEndpoint> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Imports> | |
<Import moduleName="Caching"/> | |
</Imports> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LocalStorage cleanOnRoleRecycle="false" name="Microsoft.WindowsAzure.Plugins.Caching.FileStore" sizeInMB="1000"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'dalli' | |
set :server, :thin | |
set :port, ENV['PORT'] | |
set :bind, ENV['ADDRESS'] | |
dc = Dalli::Client.new('localhost:11211') | |
dc.set('message', 'Hello World!') | |
get '/' do | |
dc.get('message') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment