{"id":201645,"date":"2025-05-10T12:54:18","date_gmt":"2025-05-10T04:54:18","guid":{"rendered":"https:\/\/server.hk\/cnblog\/201645\/"},"modified":"2025-05-10T12:54:18","modified_gmt":"2025-05-10T04:54:18","slug":"%e5%a6%82%e4%bd%95%e7%94%a8redis-setnx%e5%91%bd%e4%bb%a4%e6%9d%a5%e5%8a%a0%e9%94%81","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/201645\/","title":{"rendered":"\u5982\u4f55\u7528redis\u00a0setNX\u547d\u4ee4\u6765\u52a0\u9501"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>\u5982\u4f55\u7528redis&nbsp;setNX\u547d\u4ee4\u6765\u52a0\u9501<\/h1>\n<p><span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p><span style=\"color: #FF6600;font-family:\">\u6570\u636e\u5e93<\/span>\u4e0d\u77e5\u9053\u5927\u5bb6\u662f\u5426\u719f\u6089\uff1f\u4eca\u5929\u6211\u5c06\u7ed9\u5927\u5bb6\u4ecb\u7ecd<span style=\"color: #FF6600;font-family:\">\u300a\u5982\u4f55\u7528redis&nbsp;setNX\u547d\u4ee4\u6765\u52a0\u9501\u300b<\/span>\uff0c\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4f1a\u8bb2\u5230<span style=\"color: #FF6600;font-family:\">\u547d\u4ee4\u3001\u52a0\u9501\u3001redissetNX<\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u4f60\u5728\u770b\u5b8c\u672c\u7bc7\u6587\u7ae0\u540e\uff0c\u6709\u66f4\u597d\u7684\u5efa\u8bae\u6216\u8005\u53d1\u73b0\u54ea\u91cc\u6709\u95ee\u9898\uff0c\u5e0c\u671b\u5927\u5bb6\u90fd\u80fd\u79ef\u6781\u8bc4\u8bba\u6307\u51fa\uff0c\u8c22\u8c22\uff01\u5e0c\u671b\u6211\u4eec\u80fd\u4e00\u8d77\u52a0\u6cb9\u8fdb\u6b65\uff01<\/p>\n<h2>\u7528redis setNX\u547d\u4ee4\u6765\u52a0\u9501<\/h2>\n<p>\u52a0\u9501\u548c\u91ca\u653e\u9501\uff0c\u90fd\u9700\u8981\u539f\u5b50\u64cd\u4f5c\uff0c\u4e0d\u7136\u5728\u4e2d\u9014\u4e2d\u65ad\u5c31\u4f1a\u53d1\u751f\u5f02\u5e38\uff0c<\/p>\n<p>\u5220\u9501\u7684\u65f6\u5019\u4e5f\u53ea\u80fd\u5220\u9664\u81ea\u5df1\u5bf9\u5e94\u7ebf\u7a0b\u7684\u9501\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u7528sexNX\u547d\u4ee4\u52a0\u9501\u7684\u6a21\u677f<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20230225\/167729401563f979bfa0462.jpg\" class=\"aligncenter\"><\/p>\n<p>\u52a0\u9501\u5931\u8d25\u540e\uff0c\u4f11\u7720\u4e00\u6bb5\u65f6\u5019\u540e\uff0c\u518d\u6b21\u8c03\u7528\uff08\u81ea\u65cb\u9501\uff09<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20230225\/167729401663f979c01e0cc.jpg\" class=\"aligncenter\"><\/p>\n<p>\u8fd9\u4e2a\u8fd8\u662f\u4f1a\u6709\u4e00\u4e2a\u95ee\u9898\uff0c<\/p>\n<p>\u5982\u679c\u52a0\u9501\u7684\u65f6\u95f4\u662f30\u79d2\uff0c\u4e1a\u52a1\u6267\u884c\u7684\u65f6\u5019\u4e8640\u79d2\uff0c\u8fd9\u4e2a\u5176\u4ed6\u7684\u7ebf\u7a0b\u5c31\u80fd\u62a2\u5230\u9501\uff0c\u6240\u4ee5\u52a0\u9501\u7684\u65f6\u95f4\u5fc5\u987b\u5927\u4e8e\u4e1a\u52a1\u6267\u884c\u7684\u65f6\u95f4<\/p>\n<p>\u5b98\u65b9\u6587\u6863<\/p>\n<\/p>\n<p>\u5efa\u8bae \u4f7f\u7528redisson\u6765\u7528\u5206\u5e03\u5f0f\u9501<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20230225\/167729401663f979c08491d.jpg\" class=\"aligncenter\"><\/p>\n<h2>redis\u51e0\u79cd\u52a0\u9501\u7684\u5b9e\u73b0<\/h2>\n<h3>1. redis\u52a0\u9501\u5206\u7c7b<\/h3>\n<p>redis\u80fd\u7528\u7684\u7684\u52a0\u9501\u547d\u4ee4\u5206\u8868\u662fINCR\u3001SETNX\u3001SET<\/p>\n<h3>2. \u7b2c\u4e00\u79cd\u9501\u547d\u4ee4INCR<\/h3>\n<p>\u8fd9\u79cd\u52a0\u9501\u7684\u601d\u8def\u662f\uff0c key \u4e0d\u5b58\u5728\uff0c\u90a3\u4e48 key \u7684\u503c\u4f1a\u5148\u88ab\u521d\u59cb\u5316\u4e3a 0 \uff0c\u7136\u540e\u518d\u6267\u884c INCR \u64cd\u4f5c\u8fdb\u884c\u52a0\u4e00\u3002&nbsp;<\/p>\n<p>\u7136\u540e\u5176\u5b83\u7528\u6237\u5728\u6267\u884c INCR \u64cd\u4f5c\u8fdb\u884c\u52a0\u4e00\u65f6\uff0c\u5982\u679c\u8fd4\u56de\u7684\u6570\u5927\u4e8e 1 \uff0c\u8bf4\u660e\u8fd9\u4e2a\u9501\u6b63\u5728\u88ab\u4f7f\u7528\u5f53\u4e2d\u3002<\/p>\n<ul>\n<li>1\u3001 \u5ba2\u6237\u7aefA\u8bf7\u6c42\u670d\u52a1\u5668\u83b7\u53d6key\u7684\u503c\u4e3a1\u8868\u793a\u83b7\u53d6\u4e86\u9501<\/li>\n<li>2\u3001 \u5ba2\u6237\u7aefB\u4e5f\u53bb\u8bf7\u6c42\u670d\u52a1\u5668\u83b7\u53d6key\u7684\u503c\u4e3a2\u8868\u793a\u83b7\u53d6\u9501\u5931\u8d25<\/li>\n<li>3\u3001 \u5ba2\u6237\u7aefA\u6267\u884c\u4ee3\u7801\u5b8c\u6210\uff0c\u5220\u9664\u9501<\/li>\n<li>4\u3001 \u5ba2\u6237\u7aefB\u5728\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u540e\u5728\u53bb\u8bf7\u6c42\u7684\u65f6\u5019\u83b7\u53d6key\u7684\u503c\u4e3a1\u8868\u793a\u83b7\u53d6\u9501\u6210\u529f<\/li>\n<li>5\u3001 \u5ba2\u6237\u7aefB\u6267\u884c\u4ee3\u7801\u5b8c\u6210\uff0c\u5220\u9664\u9501&nbsp;<\/li>\n<\/ul>\n<pre>$redis-&gt;incr($key);\n$redis-&gt;expire($key, $ttl); \/\/\u8bbe\u7f6e\u751f\u6210\u65f6\u95f4\u4e3a1\u79d2<\/pre>\n<h3>3. \u7b2c\u4e8c\u79cd\u9501SETNX<\/h3>\n<p>\u8fd9\u79cd\u52a0\u9501\u7684\u601d\u8def\u662f\uff0c\u5982\u679c key \u4e0d\u5b58\u5728\uff0c\u5c06 key \u8bbe\u7f6e\u4e3a value&nbsp;<\/p>\n<p>\u5982\u679c key \u5df2\u5b58\u5728\uff0c\u5219 SETNX \u4e0d\u505a\u4efb\u4f55\u52a8\u4f5c<\/p>\n<ul>\n<li>1\u3001 \u5ba2\u6237\u7aefA\u8bf7\u6c42\u670d\u52a1\u5668\u8bbe\u7f6ekey\u7684\u503c\uff0c\u5982\u679c\u8bbe\u7f6e\u6210\u529f\u5c31\u8868\u793a\u52a0\u9501\u6210\u529f<\/li>\n<li>2\u3001 \u5ba2\u6237\u7aefB\u4e5f\u53bb\u8bf7\u6c42\u670d\u52a1\u5668\u8bbe\u7f6ekey\u7684\u503c\uff0c\u5982\u679c\u8fd4\u56de\u5931\u8d25\uff0c\u90a3\u4e48\u5c31\u4ee3\u8868\u52a0\u9501\u5931\u8d25<\/li>\n<li>3\u3001 \u5ba2\u6237\u7aefA\u6267\u884c\u4ee3\u7801\u5b8c\u6210\uff0c\u5220\u9664\u9501<\/li>\n<li>4\u3001 \u5ba2\u6237\u7aefB\u5728\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u540e\u5728\u53bb\u8bf7\u6c42\u8bbe\u7f6ekey\u7684\u503c\uff0c\u8bbe\u7f6e\u6210\u529f<\/li>\n<li>5\u3001 \u5ba2\u6237\u7aefB\u6267\u884c\u4ee3\u7801\u5b8c\u6210\uff0c\u5220\u9664\u9501&nbsp;<\/li>\n<\/ul>\n<pre>$redis-&gt;setNX($key, $value);\n$redis-&gt;expire($key, $ttl);<\/pre>\n<h3>4. \u7b2c\u4e09\u79cd\u9501SET<\/h3>\n<p>\u4e0a\u9762\u4e24\u79cd\u65b9\u6cd5\u90fd\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u4f1a\u53d1\u73b0\uff0c\u90fd\u9700\u8981\u8bbe\u7f6e key \u8fc7\u671f\u3002\u90a3\u4e48\u4e3a\u4ec0\u4e48\u8981\u8bbe\u7f6ekey\u8fc7\u671f\u5462\uff1f\u5982\u679c\u8bf7\u6c42\u6267\u884c\u56e0\u4e3a\u67d0\u4e9b\u539f\u56e0\u610f\u5916\u9000\u51fa\u4e86\uff0c\u5bfc\u81f4\u521b\u5efa\u4e86\u9501\u4f46\u662f\u6ca1\u6709\u5220\u9664\u9501\uff0c\u90a3\u4e48\u8fd9\u4e2a\u9501\u5c06\u4e00\u76f4\u5b58\u5728\uff0c\u4ee5\u81f3\u4e8e\u4ee5\u540e\u7f13\u5b58\u518d\u4e5f\u5f97\u4e0d\u5230\u66f4\u65b0\u3002\u4e8e\u662f\u4e4e\u6211\u4eec\u9700\u8981\u7ed9\u9501\u52a0\u4e00\u4e2a\u8fc7\u671f\u65f6\u95f4\u4ee5\u9632\u4e0d\u6d4b\u3002&nbsp;<\/p>\n<p>\u4f46\u662f\u501f\u52a9 Expire \u6765\u8bbe\u7f6e\u5c31\u4e0d\u662f\u539f\u5b50\u6027\u64cd\u4f5c\u4e86\u3002\u6240\u4ee5\u8fd8\u53ef\u4ee5\u901a\u8fc7\u4e8b\u52a1\u6765\u786e\u4fdd\u539f\u5b50\u6027\uff0c\u4f46\u662f\u8fd8\u662f\u6709\u4e9b\u95ee\u9898\uff0c\u6240\u4ee5\u5b98\u65b9\u5c31\u5f15\u7528\u4e86\u53e6\u5916\u4e00\u4e2a\uff0c\u4f7f\u7528 SET \u547d\u4ee4\u672c\u8eab\u5df2\u7ecf\u4ece\u7248\u672c 2.6.12 \u5f00\u59cb\u5305\u542b\u4e86\u8bbe\u7f6e\u8fc7\u671f\u65f6\u95f4\u7684\u529f\u80fd\u3002<\/p>\n<ul>\n<li>1\u3001 \u5ba2\u6237\u7aefA\u8bf7\u6c42\u670d\u52a1\u5668\u8bbe\u7f6ekey\u7684\u503c\uff0c\u5982\u679c\u8bbe\u7f6e\u6210\u529f\u5c31\u8868\u793a\u52a0\u9501\u6210\u529f<\/li>\n<li>2\u3001 \u5ba2\u6237\u7aefB\u4e5f\u53bb\u8bf7\u6c42\u670d\u52a1\u5668\u8bbe\u7f6ekey\u7684\u503c\uff0c\u5982\u679c\u8fd4\u56de\u5931\u8d25\uff0c\u90a3\u4e48\u5c31\u4ee3\u8868\u52a0\u9501\u5931\u8d25<\/li>\n<li>3\u3001 \u5ba2\u6237\u7aefA\u6267\u884c\u4ee3\u7801\u5b8c\u6210\uff0c\u5220\u9664\u9501<\/li>\n<li>4\u3001 \u5ba2\u6237\u7aefB\u5728\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u540e\u5728\u53bb\u8bf7\u6c42\u8bbe\u7f6ekey\u7684\u503c\uff0c\u8bbe\u7f6e\u6210\u529f<\/li>\n<li>5\u3001 \u5ba2\u6237\u7aefB\u6267\u884c\u4ee3\u7801\u5b8c\u6210\uff0c\u5220\u9664\u9501&nbsp;<\/li>\n<\/ul>\n<pre>$redis-&gt;set($key, $value, array('nx', 'ex' =&gt; $ttl)); &nbsp;\/\/ex\u8868\u793a\u79d2<\/pre>\n<h3>5. \u5176\u5b83\u95ee\u9898<\/h3>\n<p>\u867d\u7136\u4e0a\u9762\u4e00\u6b65\u5df2\u7ecf\u6ee1\u8db3\u4e86\u6211\u4eec\u7684\u9700\u6c42\uff0c\u4f46\u662f\u8fd8\u662f\u8981\u8003\u8651\u5176\u5b83\u95ee\u9898\uff1f&nbsp;<\/p>\n<ul>\n<li>1\u3001 redis\u53d1\u73b0\u9501\u5931\u8d25\u4e86\u8981\u600e\u4e48\u529e\uff1f\u4e2d\u65ad\u8bf7\u6c42\u8fd8\u662f\u5faa\u73af\u8bf7\u6c42\uff1f&nbsp;<\/li>\n<li>2\u3001 \u5faa\u73af\u8bf7\u6c42\u7684\u8bdd\uff0c\u5982\u679c\u6709\u4e00\u4e2a\u83b7\u53d6\u4e86\u9501\uff0c\u5176\u5b83\u7684\u5728\u53bb\u83b7\u53d6\u9501\u7684\u65f6\u5019\uff0c\u662f\u4e0d\u662f\u5bb9\u6613\u53d1\u751f\u62a2\u9501\u7684\u53ef\u80fd\uff1f&nbsp;<\/li>\n<li>3\u3001 \u9501\u63d0\u524d\u8fc7\u671f\u540e\uff0c\u5ba2\u6237\u7aefA\u8fd8\u6ca1\u6267\u884c\u5b8c\uff0c\u7136\u540e\u5ba2\u6237\u7aefB\u83b7\u53d6\u5230\u4e86\u9501\uff0c\u8fd9\u65f6\u5019\u5ba2\u6237\u7aefA\u6267\u884c\u5b8c\u4e86\uff0c\u4f1a\u4e0d\u4f1a\u5728\u5220\u9501\u7684\u65f6\u5019\u628aB\u7684\u9501\u7ed9\u5220\u6389\uff1f<\/li>\n<\/ul>\n<h3>6. \u89e3\u51b3\u529e\u6cd5<\/h3>\n<ul>\n<li>\u9488\u5bf9\u95ee\u98981\uff1a\u4f7f\u7528\u5faa\u73af\u8bf7\u6c42\uff0c\u5faa\u73af\u8bf7\u6c42\u53bb\u83b7\u53d6\u9501&nbsp;<\/li>\n<li>\u9488\u5bf9\u95ee\u98982\uff1a\u9488\u5bf9\u7b2c\u4e8c\u4e2a\u95ee\u9898\uff0c\u5728\u5faa\u73af\u8bf7\u6c42\u83b7\u53d6\u9501\u7684\u65f6\u5019\uff0c\u52a0\u5165\u7761\u7720\u529f\u80fd\uff0c\u7b49\u5f85\u51e0\u6beb\u79d2\u5728\u6267\u884c\u5faa\u73af&nbsp;<\/li>\n<li>\u9488\u5bf9\u95ee\u98983\uff1a\u5728\u52a0\u9501\u7684\u65f6\u5019\u5b58\u5165\u7684key\u662f\u968f\u673a\u7684\u3002\u8fd9\u6837\u7684\u8bdd\uff0c\u6bcf\u6b21\u5728\u5220\u9664key\u7684\u65f6\u5019\u5224\u65ad\u4e0b\u5b58\u5165\u7684key\u91cc\u7684value\u548c\u81ea\u5df1\u5b58\u7684\u662f\u5426\u4e00\u6837<\/li>\n<\/ul>\n<pre>&nbsp; &nbsp; &nbsp; &nbsp; do { &nbsp;\/\/\u9488\u5bf9\u95ee\u98981\uff0c\u4f7f\u7528\u5faa\u73af\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $timeout = 10;\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $roomid = 10001;\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $key = 'room_lock';\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $value = 'room_'.$roomid; &nbsp;\/\/\u5206\u914d\u4e00\u4e2a\u968f\u673a\u7684\u503c\u9488\u5bf9\u95ee\u98983\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $isLock = Redis::set($key, $value, 'ex', $timeout, 'nx');\/\/ex \u79d2\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($isLock) {\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (Redis::get($key) == $value) { &nbsp;\/\/\u9632\u6b62\u63d0\u524d\u8fc7\u671f\uff0c\u8bef\u5220\u5176\u5b83\u8bf7\u6c42\u521b\u5efa\u7684\u9501\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/\u6267\u884c\u5185\u90e8\u4ee3\u7801\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Redis::del($key);\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;\/\/\u6267\u884c\u6210\u529f\u5220\u9664key\u5e76\u8df3\u51fa\u5faa\u73af\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; usleep(5000); \/\/\u7761\u7720\uff0c\u964d\u4f4e\u62a2\u9501\u9891\u7387\uff0c\u7f13\u89e3redis\u538b\u529b\uff0c\u9488\u5bf9\u95ee\u98982\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }\n&nbsp; &nbsp; &nbsp; &nbsp; } while(!$isLock);<\/pre>\n<h3>7. \u53e6\u5916\u4e00\u4e2a\u9501<\/h3>\n<p>\u4ee5\u4e0a\u7684\u9501\u5b8c\u5168\u6ee1\u8db3\u4e86\u9700\u6c42\uff0c\u4f46\u662f\u5b98\u65b9\u53e6\u5916\u8fd8\u63d0\u4f9b\u4e86\u4e00\u5957\u52a0\u9501\u7684\u7b97\u6cd5\uff0c\u8fd9\u91cc\u4ee5PHP\u4e3a\u4f8b<\/p>\n<pre>&nbsp; &nbsp; $servers = [\n&nbsp; &nbsp; &nbsp; &nbsp; ['127.0.0.1', 6379, 0.01],\n&nbsp; &nbsp; &nbsp; &nbsp; ['127.0.0.1', 6389, 0.01],\n&nbsp; &nbsp; &nbsp; &nbsp; ['127.0.0.1', 6399, 0.01],\n&nbsp; &nbsp; ];\n&nbsp;\n&nbsp; &nbsp; $redLock = new RedLock($servers);\n&nbsp;\n&nbsp; &nbsp; \/\/\u52a0\u9501\n&nbsp; &nbsp; $lock = $redLock-&gt;lock('my_resource_name', 1000);\n&nbsp;\n&nbsp; &nbsp; \/\/\u5220\u9664\u9501\n&nbsp; &nbsp; $redLock-&gt;unlock($lock)<\/pre>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u4ee5\u4e0a\u4e3a\u4e2a\u4eba\u7ecf\u9a8c\uff0c\u5e0c\u671b\u80fd\u7ed9\u5927\u5bb6\u4e00\u4e2a\u53c2\u8003\uff0c\u4e5f\u5e0c\u671b\u5927\u5bb6\u591a\u591a\u652f\u6301golang\u5b66\u4e60\u7f51\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u7528redis&nbsp;se&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-201645","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/201645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=201645"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/201645\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=201645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=201645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=201645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}