npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-native-cache-provider

v0.2.0

Published

Native-only cache provider using Expo's official fingerprinting

Downloads

899

Readme

expo-native-cache-provider

Native-only build cache provider for Expo projects. It plugs into Expo's buildCacheProvider plugin system and caches native build artifacts (APK / .app bundles) using a local‑first + optional S3 strategy.

  • Caches only native artifacts (no JS/TS hash) for fast reuse while iterating on native code
  • Supports development and QA-style profiles; production builds are never cached
  • Local disk cache with optional S3 backing store

Installation

npm install expo-native-cache-provider

Peer dependency (already present in Expo apps):

npm install --save-dev @expo/config

Basic usage (Expo app config)

In your app.config.(js|ts) or app.json, register the plugin:

// app.config.js
export default {
  // ...
  buildCacheProvider: {
    plugin: "expo-native-cache-provider",
    options: {
      // Optional: see configuration section below
    },
  },
};

The provider will:

  • Calculate a native-only fingerprint (no JS/TS files)
  • Decide a profile based on your build settings:
    • debug / Debugdevelopment
    • release / Release + expo-dev-client dependency → qa
    • release / Release without dev client → production
  • Use the cache only for non‑production profiles

Configuration

The plugin accepts a partial HybridCacheConfig:

type HybridCacheConfig = {
  localCacheDir: string;
  s3?: {
    bucket: string;
    region: string;
    accessKeyId?: string;
    secretAccessKey?: string;
    endpoint?: string;
    prefix?: string;
  };
  writeThrough?: boolean; // default: true
  enableRepack?: boolean; // default: false
};

Example

export default {
  // ...
  buildCacheProvider: {
    plugin: "expo-native-cache-provider",
    options: {
      localCacheDir: "/tmp/expo-native-cache",
      s3: {
        bucket: "my-expo-native-cache",
        region: "us-east-1",
        // accessKeyId / secretAccessKey can also come from the environment
      },
      writeThrough: true,
      enableRepack: false,
    },
  },
};

Environment variables

If you omit some options, the provider falls back to environment variables:

  • EXPO_NATIVE_CACHE_LOCAL_DIR – overrides localCacheDir
  • EXPO_NATIVE_CACHE_S3_REGION – default S3 region (when not set in options.s3.region)
  • EXPO_NATIVE_CACHE_S3_ACCESS_KEY_ID
  • EXPO_NATIVE_CACHE_S3_SECRET_ACCESS_KEY
  • EXPO_NATIVE_CACHE_S3_ENDPOINT
  • EXPO_NATIVE_CACHE_S3_PREFIX

The S3 bucket must be provided via options.s3.bucket.

How it works (high level)

  • A hybrid cache checks:
    1. Local disk first
    2. S3 second (optional); on S3 hit, it writes back to disk
  • Artifacts are:
    • .apk files (Android)
    • .app bundles (iOS, stored as compressed tarballs)
  • On resolveBuildCache:
    • Cache miss → returns null (let Expo build as normal)
    • Cache hit → restores the artifact to the local cache directory
  • On uploadBuildCache:
    • Reads the built artifact
    • Stores it in the hybrid cache
    • Copies it into the local cache directory for fast reuse

When to use this provider

Use expo-native-cache-provider when you want:

  • Faster native iteration loops for Android/iOS builds
  • A clear separation between native build caching and JS/TS bundling concerns
  • Optional S3 storage for sharing artifacts across machines or CI agents