<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cache Functionality on Porch Documentation</title><link>/v1.5/docs/5_architecture_and_components/package-cache/functionality/</link><description>Recent content in Cache Functionality on Porch Documentation</description><generator>Hugo</generator><language>en-us</language><atom:link href="/v1.5/docs/5_architecture_and_components/package-cache/functionality/index.xml" rel="self" type="application/rss+xml"/><item><title>Repository Synchronization</title><link>/v1.5/docs/5_architecture_and_components/package-cache/functionality/repository-synchronization/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/v1.5/docs/5_architecture_and_components/package-cache/functionality/repository-synchronization/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&lt;p&gt;The Package Cache synchronization system manages the synchronization of package repositories between external Git sources and the internal cache. Both cache implementations (CR Cache and DB Cache) utilize a common SyncManager to handle periodic and one-time synchronization operations.&lt;/p&gt;
&lt;h3 id="high-level-architecture"&gt;High-Level Architecture&lt;/h3&gt;&lt;p&gt;&lt;img src="/v1.5/images/porch/repository-sync.svg" alt="Repository Sync Architecture" /&gt;&lt;/p&gt;


&lt;a href="/v1.5/images/porch/repository-sync-interactive.html" target="_blank"&gt;📊 Interactive Architecture Diagram&lt;/a&gt;

&lt;h2 id="core-components"&gt;Core Components&lt;/h2&gt;&lt;h3 id="1-syncmanager"&gt;1. SyncManager&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: Central orchestrator for repository synchronization operations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Components&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Handler&lt;/strong&gt;: Interface for cache-specific sync operations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Core Client&lt;/strong&gt;: Kubernetes API client for cluster communication&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Next Sync Time&lt;/strong&gt;: Tracks when the next synchronization should occur&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Last Sync Error&lt;/strong&gt;: Records any errors from previous sync attempts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Goroutines&lt;/strong&gt;:&lt;/p&gt;</description></item><item><title>Caching Behavior</title><link>/v1.5/docs/5_architecture_and_components/package-cache/functionality/caching-behavior/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/v1.5/docs/5_architecture_and_components/package-cache/functionality/caching-behavior/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&lt;p&gt;The Package Cache optimizes performance by storing repository data in memory (CR Cache) or database (DB Cache) to avoid redundant Git operations. The caching system uses lazy loading, version-based refresh, and concurrency control to balance performance with data freshness.&lt;/p&gt;
&lt;h3 id="high-level-architecture"&gt;High-Level Architecture&lt;/h3&gt;&lt;pre tabindex="0"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────┐
│ Caching System │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────┐ │
│ │ Cache │ │ Version │ │ Git │ │
│ │ Population │ ───&amp;gt; │ Tracking │ ───&amp;gt; │ Repo │ │
│ │ │ │ │ │ │ │
│ │ • Lazy Load │ │ • Compare │ │ │ │
│ │ • Refresh │ │ • Refresh │ │ │ │
│ └──────────────┘ └──────────────┘ └──────┘ │
│ │ │ │
│ └──────────┬───────────┘ │
│ ↓ │
│ ┌──────────────────┐ │
│ │ Cache Structure │ │
│ │ │ │
│ │ • Maps │ │
│ │ • Mutex │ │
│ │ • Consistency │ │
│ └──────────────────┘ │
└─────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="cache-population"&gt;Cache Population&lt;/h2&gt;&lt;p&gt;The cache uses lazy loading and version-based refresh to minimize Git operations:&lt;/p&gt;</description></item></channel></rss>