<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>SQLConnection on 每日拍拍</title>
    <link>https://dailypypy.org/tags/sqlconnection/</link>
    <description>Recent content in SQLConnection on 每日拍拍</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-tw</language>
    <copyright>© 2026 每日拍拍</copyright>
    <lastBuildDate>Tue, 13 Oct 2026 11:51:00 +0800</lastBuildDate><atom:link href="https://dailypypy.org/tags/sqlconnection/index.xml" rel="self" type="application/rss+xml" />
    <follow_challenge>
      <feedId>155076163427069952</feedId>
      <userId>154825760438254592</userId>
    </follow_challenge>
    
    
    <item>
      <title>Streamlit SQL 連線實戰：st.connection、查詢快取 TTL 與交易邊界</title>
      <link>https://dailypypy.org/learn/streamlit-sql-connection-cache/</link>
      <pubDate>Tue, 13 Oct 2026 11:51:00 +0800</pubDate>
      
      <guid>https://dailypypy.org/learn/streamlit-sql-connection-cache/</guid>
      <description>&lt;!---
1440x768
prompt: masterpiece, best quality, highres, clean anime illustration, japanese anime style, soft shading, flat color design, 1girl, black hair, green eyes, white off-shoulder shirt, black short skirt, eye-level cowboy shot, sitting sideways on a simple stool with hands resting naturally on her lap, playful reassuring wink and gentle smile, looking at viewer, pastel aqua and pale rose background, two subtle translucent rounded cylinders linked by a soft glowing arc without symbols, logos, markings, numbers, letters, or text, neat composition, detailed eyes, cute and smart vibe, minimal background, polished illustration, no text
negative prompt: worst quality, bad eye, bad hand, extra limbs, manga, multiple views, monochrome, text, signature
publication note: date preserves the required random 10:00–13:00 timestamp; publishDate permits the scheduled morning release with buildFuture=false.
dedup note: 本文是 Streamlit 的窄角度後續。../streamlit-sqlmodel-crud/ 著重 ORM 模型、表單與 CRUD；../streamlit-duckdb-dashboard/ 著重本機檔案分析；../python-streamlit-advanced/ 著重通用狀態與快取。本文只深入 named SQLConnection、兩種 TTL、參數與快取隔離、短交易、fresh read、連線復原及行為測試，不重建舊文應用。
---&gt;

&lt;h2 class=&#34;relative group&#34;&gt;一. 前言：按了重新整理，資料卻沒變？ 
    &lt;div id=&#34;一-前言按了重新整理資料卻沒變&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700&#34;
            style=&#34;text-decoration-line: none !important;&#34; href=&#34;#%e4%b8%80-%e5%89%8d%e8%a8%80%e6%8c%89%e4%ba%86%e9%87%8d%e6%96%b0%e6%95%b4%e7%90%86%e8%b3%87%e6%96%99%e5%8d%bb%e6%b2%92%e8%ae%8a&#34; aria-label=&#34;定位點&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;
&lt;p&gt;拍拍君今天遇到一個很像靈異事件的問題。
SQL 查得到新資料，Streamlit 表格卻一直顯示舊值。
重跑 App、切換頁面，都沒有用。&lt;/p&gt;</description>
      <media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://dailypypy.org/learn/streamlit-sql-connection-cache/featured.png" />
    </item>
    
  </channel>
</rss>
