{"id":14283,"date":"2023-04-11T12:39:02","date_gmt":"2023-04-11T19:39:02","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=14283"},"modified":"2025-06-13T20:19:09","modified_gmt":"2025-06-14T03:19:09","slug":"extending-dotnet-caching-provider-collections","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/es\/extending-dotnet-caching-provider-collections\/","title":{"rendered":"Ampliaci\u00f3n del proveedor de cach\u00e9 .NET para colecciones"},"content":{"rendered":"<p><span style=\"font-weight: 400\">Para ayudar a los desarrolladores de .NET a utilizar mejor Couchbase en sus aplicaciones, existe una colecci\u00f3n de aplicaciones soportadas por la comunidad <\/span><a href=\"https:\/\/github.com\/couchbaselabs\/Couchbase.Extensions\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Extensiones Couchbase<\/span><\/a><span style=\"font-weight: 400\">. Estas incluyen extensiones para cach\u00e9, sesi\u00f3n, multioperaci\u00f3n, compresi\u00f3n y bloqueo. Y hay algunas extensiones soportadas oficialmente para <a href=\"https:\/\/www.couchbase.com\/blog\/es\/dependency-injection-aspnet-couchbase\/\">inyecci\u00f3n de dependencias<\/a>telemetr\u00eda abierta y transacciones.<\/span><\/p>\n<p><span style=\"font-weight: 400\">La principal ampliaci\u00f3n a debate hoy es <\/span><b>Couchbase.Extensions.Caching<\/b><span style=\"font-weight: 400\">que implementa la <\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/aspnet\/core\/performance\/caching\/distributed?view=aspnetcore-7.0\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Interfaz de cach\u00e9 distribuida .NET<\/span><\/a><span style=\"font-weight: 400\"> utilizando Couchbase. Esto se puede a\u00f1adir a su proyecto con <\/span><a href=\"https:\/\/www.nuget.org\/packages\/Couchbase.Extensions.Caching\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">NuGet<\/span><\/a><span style=\"font-weight: 400\"> (<\/span><em><span style=\"font-weight: 400\">dotnet add package Couchbase.Extensions.Caching<\/span><\/em><span style=\"font-weight: 400\">).<\/span><\/p>\n<p><span style=\"font-weight: 400\">Recientemente, estuve trabajando con un cliente del sector de los cruceros que gestiona varias aplicaciones y desea almacenar datos en cach\u00e9 por separado para cada aplicaci\u00f3n. Sin embargo, crear un bucket completamente nuevo para cada aplicaci\u00f3n es excesivo. Se preguntaban c\u00f3mo especificar un \u00e1mbito\/colecci\u00f3n cuando se utiliza la funci\u00f3n <em>Couchbase.Extensions.Caching<\/em> biblioteca.<\/span><\/p>\n<h2>Extensiones de sesi\u00f3n y cach\u00e9<\/h2>\n<p><span style=\"font-weight: 400\">En los \u00faltimos a\u00f1os, el cambio de Couchbase SDK 2 a SDK 3 introdujo muchas nuevas caracter\u00edsticas y mejoras, incluyendo <\/span><a href=\"https:\/\/www.couchbase.com\/blog\/es\/couchbase-server-7-0-release\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">soporte de \u00e1mbitos\/colecciones<\/span><\/a><span style=\"font-weight: 400\">. En <em>Couchbase.Extensiones<\/em> tambi\u00e9n se ha actualizado para que sea compatible con el SDK 3.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Sin embargo, el <\/span><b>por defecto<\/b><span style=\"font-weight: 400\"> de esta biblioteca utiliza el <\/span><em><span style=\"font-weight: 400\">Por defecto<\/span><\/em><span style=\"font-weight: 400\"> alcance y <\/span><em><span style=\"font-weight: 400\">Por defecto<\/span><\/em><span style=\"font-weight: 400\"> sin opci\u00f3n de especificar nada m\u00e1s.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Para ver esto en acci\u00f3n, aqu\u00ed est\u00e1 la l\u00ednea de configuraci\u00f3n para a\u00f1adir Couchbase como una cach\u00e9 distribuida (tomada del archivo <\/span><a href=\"https:\/\/github.com\/couchbaselabs\/Couchbase.Extensions\/tree\/master\/example\/Couchbase.Extensions.Caching.Example\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Proyecto de ejemplo en GitHub<\/span><\/a><span style=\"font-weight: 400\">):<\/span><\/p>\n<pre class=\"nums:false lang:c# decode:true\">builder.Services.AddDistributedCouchbaseCache(\"myproject\", opt =&gt; { });<\/pre>\n<p><span style=\"font-weight: 400\">En ese c\u00f3digo, <em>miproyecto<\/em>\u00a0es un nombre de cubo. La direcci\u00f3n <\/span><em><span style=\"font-weight: 400\">op<\/span><\/em><span style=\"font-weight: 400\"> no tiene una opci\u00f3n para el nombre de \u00e1mbito\/colecci\u00f3n.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Si utilizas el proyecto de ejemplo, obtendr\u00e1s informaci\u00f3n en cach\u00e9 como \u00e9sta:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14284\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/extending-asp-net-caching-couchbase1.png\" alt=\"\" width=\"722\" height=\"246\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-asp-net-caching-couchbase1.png 722w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-asp-net-caching-couchbase1-300x102.png 300w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><\/p>\n<p><span style=\"font-weight: 400\">(Observe que los nombres de cubo, \u00e1mbito y colecci\u00f3n son <em>miproyecto<\/em>, <em>Por defecto<\/em>y <em>Por defecto<\/em>).<\/span><\/p>\n<h2>Ampliaci\u00f3n de la extensi\u00f3n<\/h2>\n<p><span style=\"font-weight: 400\">Afortunadamente, la biblioteca es lo suficientemente extensible como para que, con un poco de c\u00f3digo, se pueda apuntar a cualquier colecci\u00f3n que se desee.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Profundicemos un poco m\u00e1s en el proyecto, en concreto <em>ICouchbaseCacheCollectionProvider.cs<\/em> y <em>DefaultCouchbaseCacheCollectionProvider.cs<\/em><\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><em><span style=\"font-weight: 400\">ICouchbaseCacheCollectionProvider<\/span><\/em><span style=\"font-weight: 400\"> contiene un m\u00e9todo, <\/span><em><span style=\"font-weight: 400\">GetCollectionAsync<\/span><\/em><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><em>DefaultCouchbaseCacheCollectionProvider's<\/em> implementa ese m\u00e9todo con: <em>return cubo.Colecci\u00f3nPorDefecto();<\/em><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Pero, \u00bfy si no quieres utilizar la colecci\u00f3n por defecto?<\/span><\/p>\n<p><span style=\"font-weight: 400\">En ese caso, cree una implementaci\u00f3n personalizada de <\/span><em><span style=\"font-weight: 400\">ICouchbaseCacheCollectionProvider<\/span><\/em><span style=\"font-weight: 400\">. Llamar\u00e9 al m\u00edo <\/span><em><span style=\"font-weight: 400\">CustomCouchbaseCacheCollectionProvider<\/span><\/em><span style=\"font-weight: 400\">:<\/span><\/p>\n<pre class=\"nums:false lang:c# decode:true\">using Couchbase.KeyValue;\r\nnamespace Couchbase.Extensions.Caching.Example.Caching;\r\n\r\npublic class CustomCouchbaseCacheCollectionProvider : ICouchbaseCacheCollectionProvider\r\n{\r\n    private readonly ICouchbaseCacheBucketProvider _bucketProvider;\r\n    private readonly string _scopeName;\r\n    private readonly string _collectionName;\r\n\r\n    public CustomCouchbaseCacheCollectionProvider(ICouchbaseCacheBucketProvider bucketProvider, string scopeName, string collectionName)\r\n    {\r\n        _bucketProvider = bucketProvider;\r\n        _scopeName = scopeName;\r\n        _collectionName = collectionName;\r\n    }\r\n\r\n    public async ValueTask GetCollectionAsync()\r\n    {\r\n        var bucket = await _bucketProvider.GetBucketAsync().ConfigureAwait(false);\r\n        var scope = await bucket.ScopeAsync(_scopeName);\r\n        return await scope.CollectionAsync(_collectionName);\r\n    }\r\n}<\/pre>\n<p><span style=\"font-weight: 400\">Consid\u00e9relo un punto de partida. En su implementaci\u00f3n, puede configurarlo como desee, a\u00f1adir l\u00f3gica adicional, etc.<\/span><\/p>\n<p><span style=\"font-weight: 400\">El siguiente paso es a\u00f1adirlo como servicio (en <em>Programa.cs<\/em> t\u00edpicamente), especificando los nombres de \u00e1mbito\/colecci\u00f3n:<\/span><\/p>\n<pre class=\"nums:false lang:c# decode:true\">builder.Services.AddSingleton(x =&gt;\r\n    new CustomCouchbaseCacheCollectionProvider(\r\n        x.GetRequiredService(),\r\n        \"mycachingscope\",\r\n        \"mycachingcollection\"));<\/pre>\n<p><span style=\"font-weight: 400\">Si le preocupa que esto sea sobrescrito por el proveedor predeterminado, tenga en cuenta que <\/span><em><span style=\"font-weight: 400\">TryAddSingleton<\/span><\/em><span style=\"font-weight: 400\"> es <a href=\"https:\/\/github.com\/couchbaselabs\/Couchbase.Extensions\/blob\/master\/src\/Couchbase.Extensions.Caching\/CouchbaseCacheServiceCollectionExtensions.cs#L30\" target=\"_blank\" rel=\"noopener\">utilizado dentro de<\/a>\u00a0<\/span><em><span style=\"font-weight: 400\">AddDistributedCouchbaseCache<\/span><\/em><span style=\"font-weight: 400\">. Esto significa que <\/span><b>no<\/b><span style=\"font-weight: 400\"> sustituya su proveedor personalizado por el proveedor predeterminado.<\/span><\/p>\n<h2>Proveedor personalizado en acci\u00f3n<\/h2>\n<p><span style=\"font-weight: 400\">Esta extensi\u00f3n no crear\u00e1 realmente el \u00e1mbito y la colecci\u00f3n especificados, as\u00ed que aseg\u00farese de haberlos creado con antelaci\u00f3n.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Ejecute la aplicaci\u00f3n y pruebe la API de previsi\u00f3n meteorol\u00f3gica con la p\u00e1gina interactiva OpenAPI. La primera vez que se ejecute el endpoint se producir\u00e1 un \"fallo de cach\u00e9\", momento en el que los datos de la previsi\u00f3n meteorol\u00f3gica se escribir\u00e1n en la colecci\u00f3n especificada:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14285\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/extending-asp-net-caching-with-collections.png\" alt=\"\" width=\"621\" height=\"263\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-asp-net-caching-with-collections.png 621w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-asp-net-caching-with-collections-300x127.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/p>\n<p><span style=\"font-weight: 400\">(Observe que los nombres de cubo, \u00e1mbito y colecci\u00f3n son <em>miproyecto<\/em>, <em>mycachingscope<\/em>y <em>mycachingcollection<\/em>).<\/span><\/p>\n<h2>Resumen<\/h2>\n<p><span style=\"font-weight: 400\">Con una implementaci\u00f3n personalizada de una interfaz, y una l\u00ednea extra en <\/span><em><span style=\"font-weight: 400\">Programa.cs<\/span><\/em><span style=\"font-weight: 400\">puede especificar el \u00e1mbito\/colecci\u00f3n en el que desea almacenar los datos en cach\u00e9.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Adem\u00e1s, el <\/span><b>Couchbase.Extensions.Session<\/b><span style=\"font-weight: 400\"> utiliza la extensi\u00f3n de cach\u00e9 como mecanismo de almacenamiento subyacente.<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><span style=\"font-weight: 400\">\u00a1Feliz cach\u00e9! <\/span><a href=\"https:\/\/github.com\/couchbaselabs\/blog-source-code\/tree\/master\/Groves\/142ExtendingAspNetCaching\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">El c\u00f3digo fuente est\u00e1 disponible en GitHub<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<li><span style=\"font-weight: 400\">Para m\u00e1s informaci\u00f3n sobre .NET, consulte el <\/span><a href=\"https:\/\/www.couchbase.com\/blog\/es\/forums\/c\/net-sdk\/6\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Foro Couchbase .NET<\/span><\/a><span style=\"font-weight: 400\"> y <\/span><a href=\"https:\/\/docs.couchbase.com\/dotnet-sdk\/current\/hello-world\/start-using-sdk.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Documentaci\u00f3n del SDK de .NET<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<li><span style=\"font-weight: 400\">Si tiene preguntas sobre el almacenamiento en cach\u00e9, las sesiones o la arquitectura en general, consulte la secci\u00f3n <\/span><a href=\"https:\/\/www.couchbase.com\/blog\/es\/developers\/community\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Couchbase Discord<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>To help .NET developers better use Couchbase in their applications, there is a collection of community-supported Couchbase Extensions. These include extensions for caching, session, multiop, compression, and locking. And there are some officially supported extensions for dependency injection, open telemetry, [&hellip;]<\/p>","protected":false},"author":71,"featured_media":14286,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1811,1814,9417,9336,2201],"tags":[2052,2024],"ppma_author":[8937],"class_list":["post-14283","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-application-design","category-performance","category-scopes-and-collections","category-tools-sdks","tag-extensions","tag-session"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Extending .NET Caching Provider for Collections<\/title>\n<meta name=\"description\" content=\"With a custom implementation of an interface, and one extra line in your code, you can specify custom scope\/collections for storing data.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/es\/extending-dotnet-caching-provider-collections\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Extending .NET Caching Provider for Collections\" \/>\n<meta property=\"og:description\" content=\"With a custom implementation of an interface, and one extra line in your code, you can specify custom scope\/collections for storing data.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/es\/extending-dotnet-caching-provider-collections\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-11T19:39:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T03:19:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-dotnet-provider-collections.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Matthew Groves\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mgroves\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matthew Groves\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/\"},\"author\":{\"name\":\"Matthew Groves\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58\"},\"headline\":\"Extending .NET Caching Provider for Collections\",\"datePublished\":\"2023-04-11T19:39:02+00:00\",\"dateModified\":\"2025-06-14T03:19:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/\"},\"wordCount\":576,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-dotnet-provider-collections.png\",\"keywords\":[\"extensions\",\"session\"],\"articleSection\":[\".NET\",\"Application Design\",\"High Performance\",\"Scopes and Collections\",\"Tools &amp; SDKs\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/\",\"name\":\"Extending .NET Caching Provider for Collections\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-dotnet-provider-collections.png\",\"datePublished\":\"2023-04-11T19:39:02+00:00\",\"dateModified\":\"2025-06-14T03:19:09+00:00\",\"description\":\"With a custom implementation of an interface, and one extra line in your code, you can specify custom scope\/collections for storing data.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-dotnet-provider-collections.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-dotnet-provider-collections.png\",\"width\":1200,\"height\":628},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extending .NET Caching Provider for Collections\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58\",\"name\":\"Matthew Groves\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/ba51e6aacc53995c323a634e4502ef54\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g\",\"caption\":\"Matthew Groves\"},\"description\":\"Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.\",\"sameAs\":[\"https:\/\/crosscuttingconcerns.com\",\"https:\/\/x.com\/mgroves\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/es\/author\/matthew-groves\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ampliaci\u00f3n del proveedor de cach\u00e9 .NET para colecciones","description":"Con una implementaci\u00f3n personalizada de una interfaz, y una l\u00ednea extra en tu c\u00f3digo, puedes especificar \u00e1mbitos\/colecciones personalizadas para almacenar datos.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/es\/extending-dotnet-caching-provider-collections\/","og_locale":"es_MX","og_type":"article","og_title":"Extending .NET Caching Provider for Collections","og_description":"With a custom implementation of an interface, and one extra line in your code, you can specify custom scope\/collections for storing data.","og_url":"https:\/\/www.couchbase.com\/blog\/es\/extending-dotnet-caching-provider-collections\/","og_site_name":"The Couchbase Blog","article_published_time":"2023-04-11T19:39:02+00:00","article_modified_time":"2025-06-14T03:19:09+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-dotnet-provider-collections.png","type":"image\/png"}],"author":"Matthew Groves","twitter_card":"summary_large_image","twitter_creator":"@mgroves","twitter_misc":{"Written by":"Matthew Groves","Est. reading time":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/"},"author":{"name":"Matthew Groves","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58"},"headline":"Extending .NET Caching Provider for Collections","datePublished":"2023-04-11T19:39:02+00:00","dateModified":"2025-06-14T03:19:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/"},"wordCount":576,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-dotnet-provider-collections.png","keywords":["extensions","session"],"articleSection":[".NET","Application Design","High Performance","Scopes and Collections","Tools &amp; SDKs"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/","url":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/","name":"Ampliaci\u00f3n del proveedor de cach\u00e9 .NET para colecciones","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-dotnet-provider-collections.png","datePublished":"2023-04-11T19:39:02+00:00","dateModified":"2025-06-14T03:19:09+00:00","description":"Con una implementaci\u00f3n personalizada de una interfaz, y una l\u00ednea extra en tu c\u00f3digo, puedes especificar \u00e1mbitos\/colecciones personalizadas para almacenar datos.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-dotnet-provider-collections.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/04\/extending-dotnet-provider-collections.png","width":1200,"height":628},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/extending-dotnet-caching-provider-collections\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Extending .NET Caching Provider for Collections"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"El blog de Couchbase","description":"Couchbase, la base de datos NoSQL","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"El blog de Couchbase","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58","name":"Matthew Groves","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/ba51e6aacc53995c323a634e4502ef54","url":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","caption":"Matthew Groves"},"description":"A Matthew D. Groves le encanta programar. No importa si se trata de C#, jQuery o PHP: enviar\u00e1 pull requests para cualquier cosa. Lleva codificando profesionalmente desde que escribi\u00f3 una aplicaci\u00f3n de punto de venta en QuickBASIC para la pizzer\u00eda de sus padres, all\u00e1 por los a\u00f1os noventa. Actualmente trabaja como Director de Marketing de Producto para Couchbase. Su tiempo libre lo pasa con su familia, viendo a los Reds y participando en la comunidad de desarrolladores. Es autor de AOP in .NET, Pro Microservices in .NET, autor de Pluralsight y MVP de Microsoft.","sameAs":["https:\/\/crosscuttingconcerns.com","https:\/\/x.com\/mgroves"],"url":"https:\/\/www.couchbase.com\/blog\/es\/author\/matthew-groves\/"}]}},"authors":[{"term_id":8937,"user_id":71,"is_guest":0,"slug":"matthew-groves","display_name":"Matthew Groves","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","author_category":"","last_name":"Groves","first_name":"Matthew","job_title":"","user_url":"https:\/\/crosscuttingconcerns.com","description":"A Matthew D. Groves le encanta programar.  No importa si se trata de C#, jQuery o PHP: enviar\u00e1 pull requests para cualquier cosa.  Lleva codificando profesionalmente desde que escribi\u00f3 una aplicaci\u00f3n de punto de venta en QuickBASIC para la pizzer\u00eda de sus padres, all\u00e1 por los a\u00f1os noventa.  Actualmente trabaja como Director de Marketing de Producto para Couchbase. Su tiempo libre lo pasa con su familia, viendo a los Reds y participando en la comunidad de desarrolladores.  Es autor de AOP in .NET, Pro Microservices in .NET, autor de Pluralsight y MVP de Microsoft."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/14283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/users\/71"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=14283"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/14283\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media\/14286"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media?parent=14283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=14283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=14283"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/ppma_author?post=14283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}