<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hnw</author_name>
  <author_url>https://blog.hatena.ne.jp/hnw/</author_url>
  <blog_title>hnwの日記</blog_title>
  <blog_url>https://hnw.hatenablog.com/</blog_url>
  <categories>
    <anon>PHP</anon>
  </categories>
  <description>PHPのAPC/APCuエクステンションをKVSとして使うときの話題です。 APC/APCuにはCAS（楽観ロックに基づくアトミックな値の書き換え）の関数として次の3つが用意されています。 apc_cas ― 古い値を新しい値に更新する apc_inc ― 保存した数値を増やす apc_dec ― 保存した数値を減らす memcachedにも同様の機能があるので一見すると悩まず使えそうですが、実は罠があります。APC/APCu自体は全ての型の変数値をストアできるのですが、これらの関数については整数しか扱えないため、この機能を使う場合に限っては最初にストアする値を整数型にしておく必要があります。…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhnw.hatenablog.com%2Fentry%2F20140926&quot; title=&quot;PHPでAPC/APCuのCAS機能を使うときの注意点 - hnwの日記&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-09-26 00:00:00</published>
  <title>PHPでAPC/APCuのCAS機能を使うときの注意点</title>
  <type>rich</type>
  <url>https://hnw.hatenablog.com/entry/20140926</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
