About Services Tools Blog Contact us

Cached Social Posts

A daily refresh of recent LinkedIn and X posts, saved so public pages can show them. If a connection fails, older posts still show instead of an empty sidebar.

  • Scheduled Workers & Sync
  • Mining and exploration
  • Scheduled worker
  • Bespoke
  • Hybrid
  • 2026

The problem

Pulling live social posts on each page view is slow and limited by the networks, and it fails when a login expires. An empty sidebar looks as if the company has gone quiet. Calling both networks while a page loads also adds a delay the reader can feel.

What it does

A daily job, which staff can also start from the private admin, collects posts from LinkedIn and X. Each network saves into its own file, and the job skips the run if today's refresh has already happened. Public pages read only the saved posts, and a failed network keeps its previous posts.

Outcomes

  • The sidebar does not depend on a working login at page view.
  • A failed network leaves its previous posts in place.
  • The refresh happens once a day and not on every page.
  • Staff can refresh from the admin without a new release.

Simplified mockup

Interactive preview with sample data. Nothing is sent to a server.

Public sidebar

reads cache only
Posts on the page
4
limit 4 per network
Daily window
12:10
claimed today
Live API on page view
0
sidebar is a file read
Professional2 hours ago
Drill results from the northern licence are in. Grades held across the second fence.
Short-form5 hours ago
Core shed is full after this week’s site visit. Photographs are in the cache, not hotlinked.
Professionalyesterday
Quarterly activity report is filed. The summary is on the news page.
Short-form2 days ago
Cross-section from the ridge line is up beside the announcement.
Daily refresh
Window claimed at 12:10. Refresh to pull the new post.
  • Claim today’s window
  • Professional network
  • Short-form network
  • Write JSON cache
  • Pages stay on the cache

Expired token

professional token rejected
token rejected A live call would wipe the sidebar. These four posts stay until the fetch confirms it.
Professional cached yesterday
Drill results from the northern licence are in. Grades held across the second fence.
Professional cached yesterday
Quarterly activity report is filed. The summary is on the news page.
Short-form fresh
Core shed is full after this week’s site visit.
Short-form fresh
Cross-section from the ridge line is up beside the announcement.
Failed fetch
Same four posts until you run the fetch.

Cache directory

window claimed
Sidebar reads today
Page views that read the cache. Network calls during those views: none.
Files
professional.json4 posts
shortform.json4 posts
feed.attemptclaimed
core-shed.jpglocal copy
Updated 10 Oct 12:10. Images are stored beside the JSON, not hotlinked.
Scheduler log a second run the same day is skipped
10 Oct 12:10:02 professional: 4 posts 10 Oct 12:10:06 shortform: 4 posts 10 Oct 12:14:01 skipped: daily window already claimed 10 Oct 18:02:11 admin refresh skipped: window already claimed Homepage row still reading the 12:10 fragment. Tag set: site, drill, licence.

How it works

  1. Run the daily refresh automatically or from the private admin.
  2. Skip the run if today's refresh has already happened.
  3. Fetch each network into its own saved file.
  4. On failure, keep the previous posts for that network and mark them out of date.
  5. Public pages read the saved posts and never call the networks themselves.

Pipeline

flowchart LR
  Cron["Daily refresh"] --> Claim{"Window free"}
  Claim -->|yes| Fetch["Fetch networks"]
  Fetch --> Cache["Cache files"]
  Fetch --> Stale["Keep previous"]
  Cache --> Sidebar["Public sidebar"]