<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>morningglorycloud0203</author_name>
  <author_url>https://blog.hatena.ne.jp/morningglorycloud0203/</author_url>
  <blog_title>宅建士の業務ハック</blog_title>
  <blog_url>https://mojitonews.hateblo.jp/</blog_url>
  <categories>
    <anon>React</anon>
  </categories>
  <description>useHotelDetail.tsで自前実装していたMapキャッシュ・inFlight管理・latestNoRefによる競合制御をTanStack Queryに移行しました。176行あったコードが82行になり、「どうやるか」を全部ライブラリに任せられるようになった過程を実際のコードで整理します。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmojitonews.hateblo.jp%2Fentry%2Ftanstack-query-migration-custom-cache&quot; title=&quot;自前キャッシュをTanStack Queryに移行した——176行のコードが82行に - 宅建士の業務ハック&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/m/morningglorycloud0203/20260421/20260421095137.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-04-21 09:56:29</published>
  <title>自前キャッシュをTanStack Queryに移行した——176行のコードが82行に</title>
  <type>rich</type>
  <url>https://mojitonews.hateblo.jp/entry/tanstack-query-migration-custom-cache</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
