<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>quoll00</author_name>
  <author_url>https://blog.hatena.ne.jp/quoll00/</author_url>
  <blog_title>Carpe Diem</blog_title>
  <blog_url>https://christina04.hatenablog.com/</blog_url>
  <categories>
    <anon>Rx</anon>
    <anon>Angular</anon>
  </categories>
  <description>概要 クライアントからのAPIコールは可能であれば避けた方がサーバの負荷も下がり、ユーザの体感速度も上がります。 １度取得すればほぼ変わらないデータなどは、最初にAPIコールした後はできれば避けたいです。 一方でcookieやlocalstorageで管理するほどでもない、というときはBehaviorSubjectを利用します。 環境 Angular 4.3.4 rxjs 5.4.2 BehaviorSubjectとは 基本的な動作 BehaviorSubjectの大きな特徴は直前にonNextで渡された値を保持し、subscribe()やgetValue()するとその保持していた値を取得でき…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchristina04.hatenablog.com%2Fentry%2F2017%2F08%2F12%2F205001&quot; title=&quot;BehaviorSubjectでAPIの結果をキャッシュ - Carpe Diem&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/q/quoll00/20170812/20170812194105.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-08-12 20:50:01</published>
  <title>BehaviorSubjectでAPIの結果をキャッシュ</title>
  <type>rich</type>
  <url>https://christina04.hatenablog.com/entry/2017/08/12/205001</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
