{"id":499,"date":"2012-08-01T08:41:56","date_gmt":"2012-08-01T15:41:56","guid":{"rendered":"http:\/\/www.andreanolanusse.com\/en\/?p=499"},"modified":"2012-12-22T17:30:17","modified_gmt":"2012-12-23T01:30:17","slug":"caching-data-on-datasnap-server","status":"publish","type":"post","link":"http:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/","title":{"rendered":"Caching data on DataSnap Server"},"content":{"rendered":"<p>DataSnap memory management is very powerful and a key DataSnap feature to implement cache solution. Imagine the scenario where the client application requests the same data thousands of times every day. You will have to touch the database every time. Let\u2019s assume this data doesn\u2019t change very often, like list of countries, states or cities.<\/p>\n<p>When caching is implemented for this scenario, the first request to get the data from the database keeps it in memory. On the second and following requests the server will get the data from memory and return to the client. In other words, you just touch the database one time.<\/p>\n<p>The combination between DataSnap memory management, DBXReader and ClientDataSet are what you need to implement a caching solution.<\/p>\n<p>The DataSnap memory management is defined on the DSServerClass component using the LifeCycle property, which you can define as:<\/p>\n<ul>\n<li>Server \u2192 One class instance is used per server, all clients get the same class instance from the server (Singleton)<\/li>\n<li>Session \u2192 One class instance is used per DataSnap Session, each client get your own instance from the server (Statefull).<\/li>\n<li>Invocation \u2192 One class instance is used per invocation method (Stateless), here you can decide when create and destroy the class.<\/li>\n<\/ul>\n<p>Looking the LifeCycle property, you see that you can implement a cache solution per client (Session) or per server (Server) just by changing this property.<\/p>\n<p>Let\u2019s see how we can implement a caching solution using the scenario where I need to cache the list of states; this data is in the table STATE in this case.<\/p>\n<p>My Server Class is a DSServerModule (class name TDMDataSet5) and contains 2 private and 1 public methods, which are:<\/p>\n<pre class=\"brush: delphi\">private\r\n   function GetRecords(Fields, Table: String): TDBXReader;\r\n   function GetData(Cds : TClientDataSet; Fields, Table: String) : TDBXReader;\r\npublic\r\n   function GetState: TDBXReader;<\/pre>\n<p>GetRecords will execute the query against the database and return the records as DBXReader, this method doesn\u2019t implement any logic to check if the cache is already filled.<\/p>\n<pre class=\"brush: delphi\">function TDMDataSet5.GetRecords(Fields, Table: String): TDBXReader;\r\nvar\r\n    cmd: TDBXCommand;\r\nbegin\r\n\r\n    cmd := DMServerContainer.GetConnection.DBXConnection.CreateCommand;\r\n    try\r\n      cmd.Text := 'Select ' + Fields + ' from ' + Table;\r\n      Result := cmd.ExecuteQuery;\r\n    except\r\n      raise;\r\n    end;\r\nend;<\/pre>\n<p>Since DBXReader is unidirectional we can\u2019t keep the data in memory, the solution is to copy and maintain the data in a ClientDataSet.<\/p>\n<p>GetData is an internal method responsible to create and maintain the data in a cache, and return the data as DBXReader.<\/p>\n<p>Looking at the implementation below, the method will get the data from the database (GetRecords) only if the ClientDataSet is not active, in other words we never had the data in the cache and it will be executed only one time. After the IF statement, the TDBXDataSetReader class will copy the data from ClientDataSet to DBXReader and return that.<\/p>\n<pre class=\"brush: delphi\">function TDMDataSet5.GetData(Cds: TClientDataSet; Fields, Table: String): TDBXReader;\r\nvar\r\n    Reader : TDBXReader;\r\nbegin\r\n    if not Cds.Active then \/\/ Not active means, never move the data to ClientDataSet \u2013 no cache\r\n      begin\r\n      Reader := GetRecords(Fields, Table);\r\n      TDBXDataSetReader.CopyReaderToClientDataSet( Reader, Cds );\r\n      Reader.Free;\r\n      Cds.Open;\r\n    end;\r\n\r\n    Result := TDBXDataSetReader.Create(Cds, False (* InstanceOwner *) );\r\nend;<\/pre>\n<p>You may ask why I\u2019m copying the data from ClientDataSet to DBXReader and not return the ClientDataSet directly. Two reasons:<\/p>\n<ul>\n<li>I can\u2019t marshal\/unmarshal ClientDataSet as a JSON object<\/li>\n<li>DataSnap converts DBXReader into JSON when the server methods are invocated through REST interfaces.<\/li>\n<\/ul>\n<p>An important point here, the DSServerModule TDMDataSet5 will manage the cache. If I define the LifeCycle for this class as server it means only one cache instance for all clients \u201cglobal cache\u201d, defining it as Session means that I\u2019m creating a cache for each client connected to the server.<\/p>\n<p>On the client side using a native client as example we will get a DBXReader, it is up to your application to decide what to do with the data, but if you need to connect to this data with data-aware components, you just need to copy the DBXReader data into ClientDataSet, the TDBXDataSetReader.CopyReaderToClientDataSet method is the solution for that.<\/p>\n<pre class=\"brush: delphi\">   TDBXDataSetReader.CopyReaderToClientDataSet(Reader, CDSCity);<\/pre>\n<p>If your data related with the State table change you have to implement a server method to refresh the data. Also using LifeCycle as Server the cache will be destroyed at the moment you stop the server, but if you use LifeCycle as Session the cache will be destroyed when the client disconnect to the server.<\/p>\n<p>Using this technique you garanty the cache on the server side independent of the client implementation, also I would like to remember this solution works for DataSnap Servers, if you are using DataSnap REST interface you won&#8217;t have cache because every server request works as invocation lifecycle.<\/p>\n<p>This is one realistic example to explain how to implement cache on DataSnap Server using data from database as example, also you learned how to move data from\/to ClientDataSet to\/from DBXReader.<\/p>\n<p>You can download the source code sample <a href=\"http:\/\/cc.embarcadero.com\/download.aspx?id=28243\">here<\/a>, look at the unit DataSetDM5.pas (Server) and FormDataSet5 (client).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DataSnap memory management is very powerful and a key DataSnap feature to implement cache solution. Imagine the scenario where the client application requests the same data thousands of times every day. You will have to touch the database every time. Let\u2019s assume this data doesn\u2019t change very often, like list of countries, states or cities. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":483,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_s2mail":"yes","footnotes":""},"categories":[11,10],"tags":[93,21,90],"class_list":["post-499","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cbuilder","category-delphi","tag-cbuilder","tag-datasnap","tag-delphi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Caching data on DataSnap Server | Andreano Lanusse | Technology and Software Development<\/title>\n<meta name=\"description\" content=\"DataSnap memory management is very powerful and a key DataSnap feature to implement cache solution. Imagine the scenario where the client application\" \/>\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.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Caching data on DataSnap Server | Andreano Lanusse | Technology and Software Development\" \/>\n<meta property=\"og:description\" content=\"DataSnap memory management is very powerful and a key DataSnap feature to implement cache solution. Imagine the scenario where the client application\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Andreano Lanusse | Technology and Software Development\" \/>\n<meta property=\"article:published_time\" content=\"2012-08-01T15:41:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-12-23T01:30:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/01\/Icon_StarterEdition.png\" \/>\n\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t<meta property=\"og:image:height\" content=\"175\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Andreano Lanusse\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andreano Lanusse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/\"},\"author\":{\"name\":\"Andreano Lanusse\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\"},\"headline\":\"Caching data on DataSnap Server\",\"datePublished\":\"2012-08-01T15:41:56+00:00\",\"dateModified\":\"2012-12-23T01:30:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/\"},\"wordCount\":724,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\"},\"image\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/01\/Icon_StarterEdition.png\",\"keywords\":[\"C++Builder\",\"DataSnap\",\"Delphi\"],\"articleSection\":[\"C++Builder\",\"Delphi\"],\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/\",\"url\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/\",\"name\":\"Caching data on DataSnap Server | Andreano Lanusse | Technology and Software Development\",\"isPartOf\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/01\/Icon_StarterEdition.png\",\"datePublished\":\"2012-08-01T15:41:56+00:00\",\"dateModified\":\"2012-12-23T01:30:17+00:00\",\"description\":\"DataSnap memory management is very powerful and a key DataSnap feature to implement cache solution. Imagine the scenario where the client application\",\"breadcrumb\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#primaryimage\",\"url\":\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/01\/Icon_StarterEdition.png\",\"contentUrl\":\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/01\/Icon_StarterEdition.png\",\"width\":350,\"height\":175},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.andreanolanusse.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Caching data on DataSnap Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#website\",\"url\":\"https:\/\/www.andreanolanusse.com\/en\/\",\"name\":\"Andreano Lanusse | Technology and Software Development\",\"description\":\"Where Andreano Lanusse talk about technology, software development, programming techniques, databases, games and more through articles, tutorials and videos\",\"publisher\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.andreanolanusse.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\",\"name\":\"Andreano Lanusse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g\",\"caption\":\"Andreano Lanusse\"},\"logo\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/\"},\"description\":\"Andreano Lanusse is an expert and enthusiastic on software development industry, at Embarcadero he is focused on helping to make sure the products being developed meet the expectations of Embarcadero's customers, as well as defining market strategies for Latin America. Today as Latin Lead Evangelist he spends great deal of time in developer conferences, tradeshows, user group, and visiting customers throughout Latin America. Before Embarcadero, he worked 13 years for Borland, Andreano has worked as Support Coordinator, Engineer, Product Manager, including Product Line Sales Manager, where was responsible to manage the relationship with Brazil developer community, also has worked as Principal Consultant for Borland Consulting Services on the development and management of critical applications. He previously served as Chief Architect for USS Solu\u00e7\u00f5es Gerenciadas (now USS Tempo). Andreano holds a bachelor's degree in Business Administration Marketing Emphasis from Sumare Institute, MBA in Project Management from FGV, certification in Microsoft products, all Borland ALM products, and all CodeGear product line.\",\"sameAs\":[\"http:\/\/www.andreanolanusse.com\",\"https:\/\/x.com\/andreanolanusse\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Caching data on DataSnap Server | Andreano Lanusse | Technology and Software Development","description":"DataSnap memory management is very powerful and a key DataSnap feature to implement cache solution. Imagine the scenario where the client application","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.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/","og_locale":"en_US","og_type":"article","og_title":"Caching data on DataSnap Server | Andreano Lanusse | Technology and Software Development","og_description":"DataSnap memory management is very powerful and a key DataSnap feature to implement cache solution. Imagine the scenario where the client application","og_url":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/","og_site_name":"Andreano Lanusse | Technology and Software Development","article_published_time":"2012-08-01T15:41:56+00:00","article_modified_time":"2012-12-23T01:30:17+00:00","og_image":[{"width":350,"height":175,"url":"https:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/01\/Icon_StarterEdition.png","type":"image\/png"}],"author":"Andreano Lanusse","twitter_misc":{"Written by":"Andreano Lanusse","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#article","isPartOf":{"@id":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/"},"author":{"name":"Andreano Lanusse","@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b"},"headline":"Caching data on DataSnap Server","datePublished":"2012-08-01T15:41:56+00:00","dateModified":"2012-12-23T01:30:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/"},"wordCount":724,"commentCount":6,"publisher":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b"},"image":{"@id":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#primaryimage"},"thumbnailUrl":"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/01\/Icon_StarterEdition.png","keywords":["C++Builder","DataSnap","Delphi"],"articleSection":["C++Builder","Delphi"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/","url":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/","name":"Caching data on DataSnap Server | Andreano Lanusse | Technology and Software Development","isPartOf":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#primaryimage"},"image":{"@id":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#primaryimage"},"thumbnailUrl":"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/01\/Icon_StarterEdition.png","datePublished":"2012-08-01T15:41:56+00:00","dateModified":"2012-12-23T01:30:17+00:00","description":"DataSnap memory management is very powerful and a key DataSnap feature to implement cache solution. Imagine the scenario where the client application","breadcrumb":{"@id":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#primaryimage","url":"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/01\/Icon_StarterEdition.png","contentUrl":"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/01\/Icon_StarterEdition.png","width":350,"height":175},{"@type":"BreadcrumbList","@id":"https:\/\/www.andreanolanusse.com\/en\/caching-data-on-datasnap-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.andreanolanusse.com\/en\/"},{"@type":"ListItem","position":2,"name":"Caching data on DataSnap Server"}]},{"@type":"WebSite","@id":"https:\/\/www.andreanolanusse.com\/en\/#website","url":"https:\/\/www.andreanolanusse.com\/en\/","name":"Andreano Lanusse | Technology and Software Development","description":"Where Andreano Lanusse talk about technology, software development, programming techniques, databases, games and more through articles, tutorials and videos","publisher":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.andreanolanusse.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":["Person","Organization"],"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b","name":"Andreano Lanusse","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g","caption":"Andreano Lanusse"},"logo":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/"},"description":"Andreano Lanusse is an expert and enthusiastic on software development industry, at Embarcadero he is focused on helping to make sure the products being developed meet the expectations of Embarcadero's customers, as well as defining market strategies for Latin America. Today as Latin Lead Evangelist he spends great deal of time in developer conferences, tradeshows, user group, and visiting customers throughout Latin America. Before Embarcadero, he worked 13 years for Borland, Andreano has worked as Support Coordinator, Engineer, Product Manager, including Product Line Sales Manager, where was responsible to manage the relationship with Brazil developer community, also has worked as Principal Consultant for Borland Consulting Services on the development and management of critical applications. He previously served as Chief Architect for USS Solu\u00e7\u00f5es Gerenciadas (now USS Tempo). Andreano holds a bachelor's degree in Business Administration Marketing Emphasis from Sumare Institute, MBA in Project Management from FGV, certification in Microsoft products, all Borland ALM products, and all CodeGear product line.","sameAs":["http:\/\/www.andreanolanusse.com","https:\/\/x.com\/andreanolanusse"]}]}},"_links":{"self":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/posts\/499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/comments?post=499"}],"version-history":[{"count":0,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/posts\/499\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/media\/483"}],"wp:attachment":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/media?parent=499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/categories?post=499"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/tags?post=499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}