Skip to content

Add TTL for local cache directory, for faster subsequent previews #101

@audiodude

Description

@audiodude

The current flow for generating a preview is:

  1. Download the assets from object storage to a local directory
  2. Add the .eno files
  3. Call Faircamp to generate the preview
  4. Upload the preview files to object storage
  5. Delete the local directory

Previews are already taking almost a minute to generate in production (they only take a few seconds locally in development), presumably because of Faircamp transcoding on our wimpy box. It would be nice to save the cache directory of the local folder so that while someone is editing their site, subsequent previews would be much faster.

Of course, if we indefinitely save all the cache directories, we're back to a world where we have all of everyone's data on the local volumne. We should set a TTL and treat this like an actual cache, that gets cleared if the user hasn't made any action on the site for N seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions