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
<ServiceConfiguration name="CloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" schemaVersion="2014-06.2.4"> | |
<Role name="CloudService.Web" vmName="WebInst"> | |
<Instances count="2"/> | |
<ConfigurationSettings> | |
... | |
</ConfigurationSettings> | |
<Certificates> | |
... | |
</Certificates> | |
</Role> |
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
cache.ListLeftPush("MiLista", "Nuevo valor"); |
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
using System; | |
using Newtonsoft.Json; | |
using StackExchange.Redis; | |
namespace RedisCache | |
{ | |
public static class CacheExtensions | |
{ | |
public static T Get<T>(this IDatabase cache, string key) | |
{ |
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
// Almacena un valor con la key MiKey | |
cache.StringSet("MiKey", "Valor a almacenar"); | |
// Obtiene nuevamente el valor almacenado | |
string valor = cache.StringGet("MiKey"); |
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
string app = "<tu nombre>.redis.cache.windows.net"; | |
string key = "<key obtenida del portal>"; | |
ConnectionMultiplexer connection = ConnectionMultiplexer.Connect(string.Format("{0},ssl=true,password={1}", app, key)); |
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
IDatabase cache = connection.GetDatabase(); |
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
{ | |
"name" : "miorigendedatossql", | |
"type" : "azuresql", | |
"credentials" : { "connectionString" : "cadena de conexión" }, | |
"container" : { "name" : "nombre de la tabla o vista" }, | |
"dataChangeDetectionPolicy" : { | |
"@odata.type" : "#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy", | |
"highWaterMarkColumnName" : "[un nombre de columna row version o de ultima_actualizacion]" | |
} | |
} |
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
{ | |
"name" : "miorigendedatossql", | |
"type" : "azuresql", | |
"credentials" : { "connectionString" : "cadena de conexión" }, | |
"container" : { "name" : "nombre de la tabla o vista" }, | |
"dataChangeDetectionPolicy" : { | |
"@odata.type" : "#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy", | |
"highWaterMarkColumnName" : "[un nombre de columna row version o de ultima_actualizacion]" | |
}, | |
"dataDeletionDetectionPolicy" : { |
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
{ | |
"name" : "miorigendedatossql", | |
"type" : "azuresql", | |
"credentials" : { "connectionString" : "Server=tcp:<tu servidor>.database.windows.net,1433;Database=<tu base de datos>;User ID=<tu nombre de usuario>;Password=<tu contraseña>;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" }, | |
"container" : { "name" : "Peliculas" } | |
} |
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
ALTER TABLE Peliculas | |
ENABLE CHANGE_TRACKING | |
WITH (TRACK_COLUMNS_UPDATED = ON) |