{"id":1656,"date":"2014-12-16T19:35:32","date_gmt":"2014-12-16T19:35:32","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=1656"},"modified":"2014-12-16T19:35:32","modified_gmt":"2014-12-16T19:35:32","slug":"introducing-nhibernate-couchbase-2nd-level-cache-provider","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/pt\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/","title":{"rendered":"Apresentando o provedor de cache de segundo n\u00edvel do NHibernate Couchbase"},"content":{"rendered":"<p>O NHibernate h\u00e1 muito tempo suporta a no\u00e7\u00e3o de caches de segundo n\u00edvel, em que os resultados da consulta s\u00e3o salvos em um cache fora do processo para uma recupera\u00e7\u00e3o mais r\u00e1pida.  O <a href=\"https:\/\/sourceforge.net\/projects\/nhcontrib\/\">NHContrib<\/a> possui esses caches, que incluem ASP.NET HttpCache, Velocity (AppFabric) e Memcached.  Esse \u00faltimo cache - Memcached - \u00e9 implementado usando a biblioteca Enyim.Caching, da qual depende a biblioteca do cliente .NET Couchbase.  Dada essa depend\u00eancia e o fato de o Couchbase ser compat\u00edvel com o Memcached, adicionar o Couchbase ao conjunto de caches de segundo n\u00edvel dispon\u00edveis para o NHibernate pareceu natural.<\/p>\n<p>Acabei de terminar a portabilidade do provedor NHContrib Memcached para o Couchbase.  O novo cache do Couchbase est\u00e1 dispon\u00edvel no Couchbase Labs em https:\/\/github.com\/couchbaselabs\/nhibernate-caches-couchbase.  Ele \u00e9 plug and play e vem com um projeto ASP.NET MVC de amostra para demonstrar seu uso.  Detalhei a configura\u00e7\u00e3o no arquivo README.md no reposit\u00f3rio, mas vou apontar algumas das configura\u00e7\u00f5es do projeto de amostra para dar uma ideia de como us\u00e1-lo.<\/p>\n<p>Na amostra, eu uso <a href=\"https:\/\/www.fluentnhibernate.org\/\">FluentNHibernate<\/a> para configura\u00e7\u00e3o.  N\u00e3o descreverei o FluentNHibernate aqui, a n\u00e3o ser para dizer que ele permite que voc\u00ea configure o NHibernate no c\u00f3digo, em vez do conjunto padr\u00e3o de arquivos XML.  No projeto de exemplo, tenho uma classe est\u00e1tica com um m\u00e9todo est\u00e1tico para configurar o cliente.<\/p>\n<div class=\"geshifilter\">\n<div class=\"csharp geshifilter-csharp\" style=\"font-family:monospace;\"><span style=\"color: #0600FF; font-weight: bold;\">p\u00fablico<\/span> <span style=\"color: #6666cc; font-weight: bold;\">classe<\/span> FluentSession<br \/>\n<span style=\"color: #008000;\">{<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #0600FF; font-weight: bold;\">p\u00fablico<\/span> <span style=\"color: #0600FF; font-weight: bold;\">est\u00e1tico<\/span> ISessionFactory CreateSessionFactory<span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #008000;\">{<\/span><br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 <span style=\"color: #6666cc; font-weight: bold;\">string<\/span> connectionString <span style=\"color: #008000;\">=<\/span> <span style=\"color: #666666;\">@\"Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Beers.mdf;Integrated Security=True;User Instance=True\"<\/span><span style=\"color: #008000;\">;<\/span><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 <span style=\"color: #0600FF; font-weight: bold;\">retorno<\/span> Fluentemente<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Configurar<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Banco de dados<\/span><span style=\"color: #008000;\">(<\/span>MsSqlConfiguration<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">MsSql2008<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">ConnectionString<\/span><span style=\"color: #008000;\">(<\/span>connectionString<span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">)<\/span><br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <span style=\"color: #008000;\"><<\/span>forte<span style=\"color: #008000;\">>.<\/span><span style=\"color: #0000FF;\">Cache<\/span><span style=\"color: #008000;\">(<\/span>c <span style=\"color: #008000;\">=><\/span> c<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">UseQueryCache<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Classe de provedor<\/span><span style=\"color: #008000;\"><<\/span>CouchbaseCacheProvider<span style=\"color: #008000;\">><\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\"><\/<\/span>forte<span style=\"color: #008000;\">><\/span><br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Mapeamentos<\/span><span style=\"color: #008000;\">(<\/span>m <span style=\"color: #008000;\">=><\/span>m<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">FluentMappings<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">AddFromAssemblyOf<\/span><span style=\"color: #008000;\"><<\/span>Cerveja<span style=\"color: #008000;\">><\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">)<\/span><br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">ExposeConfiguration<\/span><span style=\"color: #008000;\">(<\/span>c <span style=\"color: #008000;\">=><\/span> c<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">SetProperty<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #666666;\">\"current_session_context_class\"<\/span>, <span style=\"color: #666666;\">\"web\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">)<\/span><br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">BuildSessionFactory<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #008000;\">}<\/span><\/p>\n<p>\u00a0 \u00a0 <span style=\"color: #008000;\">&#8230;<\/span><br \/>\n<span style=\"color: #008000;\">}<\/span><\/div>\n<\/div>\n<p>A linha relevante para o provedor de cache do Couchbase est\u00e1 na chamada fluente .Cache, na qual voc\u00ea est\u00e1 instruindo o NHibernate a armazenar em cache as consultas e a armazen\u00e1-las usando o novo provedor de cache do Couchbase.  Al\u00e9m disso, n\u00e3o h\u00e1 nada espec\u00edfico sobre o provedor Couchbase que precise ser configurado.  No entanto, h\u00e1 algumas outras partes necess\u00e1rias para usar qualquer cache de segundo n\u00edvel.  Voc\u00ea precisa ativar o cache na classe de modelo.<\/p>\n<p>Ent\u00e3o, para minha aula sobre cerveja:<\/p>\n<div class=\"geshifilter\">\n<div class=\"csharp geshifilter-csharp\" style=\"font-family:monospace;\"><span style=\"color: #0600FF; font-weight: bold;\">p\u00fablico<\/span> <span style=\"color: #6666cc; font-weight: bold;\">classe<\/span> Cerveja<br \/>\n<span style=\"color: #008000;\">{<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #008000;\">[<\/span>Necess\u00e1rio<span style=\"color: #008000;\">]<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #0600FF; font-weight: bold;\">p\u00fablico<\/span> <span style=\"color: #0600FF; font-weight: bold;\">virtual<\/span> <span style=\"color: #6666cc; font-weight: bold;\">int<\/span> Id <span style=\"color: #008000;\">{<\/span> obter<span style=\"color: #008000;\">;<\/span> definir<span style=\"color: #008000;\">;<\/span> <span style=\"color: #008000;\">}<\/span><\/p>\n<p>\u00a0 \u00a0 <span style=\"color: #008000;\">[<\/span>Necess\u00e1rio<span style=\"color: #008000;\">]<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #0600FF; font-weight: bold;\">p\u00fablico<\/span> <span style=\"color: #0600FF; font-weight: bold;\">virtual<\/span> <span style=\"color: #6666cc; font-weight: bold;\">string<\/span> Nome <span style=\"color: #008000;\">{<\/span> obter<span style=\"color: #008000;\">;<\/span> definir<span style=\"color: #008000;\">;<\/span> <span style=\"color: #008000;\">}<\/span><\/p>\n<p>\u00a0 \u00a0 <span style=\"color: #008000;\">[<\/span>Necess\u00e1rio<span style=\"color: #008000;\">]<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #0600FF; font-weight: bold;\">p\u00fablico<\/span> <span style=\"color: #0600FF; font-weight: bold;\">virtual<\/span> <span style=\"color: #6666cc; font-weight: bold;\">string<\/span> Cervejaria <span style=\"color: #008000;\">{<\/span> obter<span style=\"color: #008000;\">;<\/span> definir<span style=\"color: #008000;\">;<\/span> <span style=\"color: #008000;\">}<\/span><\/p>\n<p>\u00a0 \u00a0 <span style=\"color: #008000;\">[<\/span>Necess\u00e1rio<span style=\"color: #008000;\">]<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #0600FF; font-weight: bold;\">p\u00fablico<\/span> <span style=\"color: #0600FF; font-weight: bold;\">virtual<\/span> <span style=\"color: #6666cc; font-weight: bold;\">flutuante<\/span> ABV <span style=\"color: #008000;\">{<\/span> obter<span style=\"color: #008000;\">;<\/span> definir<span style=\"color: #008000;\">;<\/span> <span style=\"color: #008000;\">}<\/span><br \/>\n<span style=\"color: #008000;\">}<\/span><\/div>\n<\/div>\n<p>Tenho que definir a op\u00e7\u00e3o Cache no BeerMap.<\/p>\n<div class=\"geshifilter\">\n<div class=\"csharp geshifilter-csharp\" style=\"font-family:monospace;\"><span style=\"color: #0600FF; font-weight: bold;\">p\u00fablico<\/span> <span style=\"color: #6666cc; font-weight: bold;\">classe<\/span> BeerMap <span style=\"color: #008000;\">:<\/span> ClassMap<span style=\"color: #008000;\"><<\/span>Cerveja<span style=\"color: #008000;\">><\/span><br \/>\n<span style=\"color: #008000;\">{<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #0600FF; font-weight: bold;\">p\u00fablico<\/span> BeerMap<span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #008000;\">{<\/span><br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 Tabela<span style=\"color: #008000;\">(<\/span><span style=\"color: #666666;\">\"Cervejas\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><br \/>\n<span style=\"color: #008000;\"><<\/span>forte<span style=\"color: #008000;\">><\/span> \u00a0 \u00a0 \u00a0 \u00a0Cache<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Leitura e grava\u00e7\u00e3o<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><\/p>\n<p><span style=\"color: #008000;\"><\/<\/span>forte<span style=\"color: #008000;\">><\/span> \u00a0 \u00a0 \u00a0 \u00a0Id<span style=\"color: #008000;\">(<\/span>b <span style=\"color: #008000;\">=><\/span> b<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Id<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 Mapa<span style=\"color: #008000;\">(<\/span>b <span style=\"color: #008000;\">=><\/span> b<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Nome<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">N\u00e3o<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Nul\u00e1vel<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Comprimento<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #FF0000;\">30<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 Mapa<span style=\"color: #008000;\">(<\/span>b <span style=\"color: #008000;\">=><\/span> b<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Cervejaria<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">N\u00e3o<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Nul\u00e1vel<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Comprimento<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #FF0000;\">50<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 Mapa<span style=\"color: #008000;\">(<\/span>b <span style=\"color: #008000;\">=><\/span> b<span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">ABV<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">N\u00e3o<\/span><span style=\"color: #008000;\">.<\/span><span style=\"color: #0000FF;\">Nul\u00e1vel<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">;<\/span><br \/>\n\u00a0 \u00a0 <span style=\"color: #008000;\">}<\/span><br \/>\n<span style=\"color: #008000;\">}<\/span><\/div>\n<\/div>\n<p>Algo que deve ser lembrado em qualquer cache de segundo n\u00edvel e projetos da Web.  Por padr\u00e3o, o cache ser\u00e1 por solicita\u00e7\u00e3o, n\u00e3o por sess\u00e3o.  Voc\u00ea precisa configurar um aplicativo ASP.NET para gerenciar suas sess\u00f5es conforme descrito <a href=\"https:\/\/bengtbe.com\/blog\/2009\/10\/08\/nerddinner-with-fluent-nhibernate-part-3-the-infrastructure\/\">aqui<\/a>.  Se voc\u00ea n\u00e3o configurar seu aplicativo dessa forma, ver\u00e1 que o cache est\u00e1 sendo recriado para cada solicita\u00e7\u00e3o, mesmo dentro da mesma sess\u00e3o. \u00a0<\/p>\n<p>Portanto, se voc\u00ea estava esperando por uma solu\u00e7\u00e3o de cache de segundo n\u00edvel extremamente r\u00e1pida e dimension\u00e1vel para o NHibernate, ela est\u00e1 aqui.<\/p>\n<p>Observe que esse provedor est\u00e1 inclu\u00eddo como parte do Couchbase Labs e n\u00e3o \u00e9 um produto com suporte oficial.  Voc\u00ea est\u00e1 livre para usar o c\u00f3digo como quiser, pois ele est\u00e1 licenciado sob a Apache License 2.0.  O projeto original encontrado no NHContrib est\u00e1 licenciado sob a LGPL.<\/p>","protected":false},"excerpt":{"rendered":"<p>NHibernate has long supported the notion of a 2nd level caches, where query results are saved to an out-of-process cache for faster retrieval.\u00a0 The NHContrib project owns these caches, which include ASP.NET HttpCache, Velocity (AppFabric) and Memcached.\u00a0 That last cache [&hellip;]<\/p>","protected":false},"author":22,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"ppma_author":[8980],"class_list":["post-1656","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.2 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Introducing the NHibernate Couchbase 2nd Level Cache Provider - The Couchbase Blog<\/title>\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\/pt\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introducing the NHibernate Couchbase 2nd Level Cache Provider\" \/>\n<meta property=\"og:description\" content=\"NHibernate has long supported the notion of a 2nd level caches, where query results are saved to an out-of-process cache for faster retrieval.\u00a0 The NHContrib project owns these caches, which include ASP.NET HttpCache, Velocity (AppFabric) and Memcached.\u00a0 That last cache [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/pt\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-16T19:35:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"John Zablocki, NET. SDK Developer, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Zablocki, NET. SDK Developer, Couchbase\" \/>\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\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/\"},\"author\":{\"name\":\"John Zablocki, NET. SDK Developer, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/ee312fb775c13d20a32f1d455888a282\"},\"headline\":\"Introducing the NHibernate Couchbase 2nd Level Cache Provider\",\"datePublished\":\"2014-12-16T19:35:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/\"},\"wordCount\":556,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Uncategorized\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/\",\"name\":\"Introducing the NHibernate Couchbase 2nd Level Cache Provider - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2014-12-16T19:35:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introducing the NHibernate Couchbase 2nd Level Cache Provider\"}]},{\"@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\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@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\/ee312fb775c13d20a32f1d455888a282\",\"name\":\"John Zablocki, NET. SDK Developer, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/201925d9efc4992ce80385b76fdea34b\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8c5a77152c796c424a3f7f6d9fa31a999a7fe115d64c2acc93c4c0c014e6512a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8c5a77152c796c424a3f7f6d9fa31a999a7fe115d64c2acc93c4c0c014e6512a?s=96&d=mm&r=g\",\"caption\":\"John Zablocki, NET. SDK Developer, Couchbase\"},\"description\":\"John Zablocki is a NET. SDK Developer at Couchbase. John is also the organizer of Beantown ALT.NET and a former adjunct at Fairfield University. You can also check out the book on Amazon named \\\"Couchbase Essentials\\\" which explains how to install and configure Couchbase Server.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/pt\/author\/john-zablocki\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Introducing the NHibernate Couchbase 2nd Level Cache Provider - The Couchbase Blog","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\/pt\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/","og_locale":"pt_BR","og_type":"article","og_title":"Introducing the NHibernate Couchbase 2nd Level Cache Provider","og_description":"NHibernate has long supported the notion of a 2nd level caches, where query results are saved to an out-of-process cache for faster retrieval.\u00a0 The NHContrib project owns these caches, which include ASP.NET HttpCache, Velocity (AppFabric) and Memcached.\u00a0 That last cache [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/pt\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/","og_site_name":"The Couchbase Blog","article_published_time":"2014-12-16T19:35:32+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"John Zablocki, NET. SDK Developer, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Zablocki, NET. SDK Developer, Couchbase","Est. reading time":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/"},"author":{"name":"John Zablocki, NET. SDK Developer, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/ee312fb775c13d20a32f1d455888a282"},"headline":"Introducing the NHibernate Couchbase 2nd Level Cache Provider","datePublished":"2014-12-16T19:35:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/"},"wordCount":556,"commentCount":3,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["Uncategorized"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/","url":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/","name":"Introducing the NHibernate Couchbase 2nd Level Cache Provider - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2014-12-16T19:35:32+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/introducing-nhibernate-couchbase-2nd-level-cache-provider\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Introducing the NHibernate Couchbase 2nd Level Cache Provider"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"Blog do Couchbase","description":"Couchbase, o banco de dados 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":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"Blog do Couchbase","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@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\/ee312fb775c13d20a32f1d455888a282","name":"John Zablocki, NET. SDK, Couchbase","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/201925d9efc4992ce80385b76fdea34b","url":"https:\/\/secure.gravatar.com\/avatar\/8c5a77152c796c424a3f7f6d9fa31a999a7fe115d64c2acc93c4c0c014e6512a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8c5a77152c796c424a3f7f6d9fa31a999a7fe115d64c2acc93c4c0c014e6512a?s=96&d=mm&r=g","caption":"John Zablocki, NET. SDK Developer, Couchbase"},"description":"John Zablocki is a NET. SDK Developer at Couchbase. John is also the organizer of Beantown ALT.NET and a former adjunct at Fairfield University. You can also check out the book on Amazon named \"Couchbase Essentials\" which explains how to install and configure Couchbase Server.","url":"https:\/\/www.couchbase.com\/blog\/pt\/author\/john-zablocki\/"}]}},"authors":[{"term_id":8980,"user_id":22,"is_guest":0,"slug":"john-zablocki","display_name":"John Zablocki, NET. SDK Developer, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/8c5a77152c796c424a3f7f6d9fa31a999a7fe115d64c2acc93c4c0c014e6512a?s=96&d=mm&r=g","author_category":"","last_name":"Zablocki","first_name":"John","job_title":"","user_url":"","description":"John Zablocki \u00e9 um desenvolvedor NET. SDK Developer na Couchbase. John tamb\u00e9m \u00e9 o organizador do Beantown ALT.NET e ex-adjunto da Fairfield University.\r\nVoc\u00ea tamb\u00e9m pode conferir o livro na Amazon chamado \"Couchbase Essentials\", que explica como instalar e configurar o Couchbase Server."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/1656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/comments?post=1656"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/1656\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media?parent=1656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/categories?post=1656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/tags?post=1656"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/ppma_author?post=1656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}