0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

HerokuのRedisをflushallする

Posted at

はじめに

HerokuにWordPress入れてブログ書いているものです。
DBに直接接続してデータ一括更新する機会があったのですが、トップページがどうも更新されない... :thinking:
DBへそもそも取りに行ってないな... :thinking:
コード追いかけてたら、DBから取得したデータをRedisにキャッシュしてました。

あ、じゃあRedisをflushallすればいいか!

heroku-redis使っているんだが、接続してflushallしたい!

作戦

  1. heroku-redisに繋ぐ
  2. flushallする

redisに繋ぐ

$ heroku redis:cli

flushallする

$ flushall

おわりに

無事にトップページが更新されて安堵です :smile:
herokuのredisへの接続ってどうするんだろうと思ったのですが、上記で行けることに少し感動しました。

自分もマシンにredis-cli入ってないけど、このために入れる?
クライアントアプリは入っているけど、このために設定する?

上記をせずにできたのが個人的にはうれしかったです。

参考になりましたら幸いです :pray:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?