爱意满满的作品展示区。
flyingfz

pg2redis . 分享一个简单但有用的小工具

  •  
  •   flyingfz · Jun 11, 2021 · 2110 views
    This topic created in 1852 days ago, the information mentioned may be changed or developed.
    开发应用系统的时候,从提高性能角度,免不了要用到 redis 作缓存。
    但缓存过期又是个麻烦的事情,需要额外增加一些代码更新缓存的数据。

    如果正好用到了 PG 数据库,那么,可以看看这个工具
    这个工具在你的代码更新了 数据库的记录之后,会根据配置文件,自动更新 redis 里对应的缓存。

    主要使用了 pg 的 notify 、listen 特性。

    地址: https://github.com/flyingfz/pg2redis
    1 replies    2021-06-12 09:23:49 +08:00
    aec4d
        1
    aec4d  
       Jun 12, 2021 via iPhone
    想法很赞
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5241 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 09:05 · PVG 17:05 · LAX 02:05 · JFK 05:05
    ♥ Do have faith in what you're doing.