Skip to content

Optimize dub.co and youtube integrations #263

@gaboesquivel

Description

@gaboesquivel

Optimize integrations for Dub.co and YouTube at build time in Next.js. Save the results to a file and ensure the data is read only once every 3 days for YouTube, and only once for Dub.co shortlinks. Define a format to save data as "slug:shortlink".

Task List

  1. Setup a Timer:
    • Implement a timer mechanism to check the last fetch time for YouTube (every 3 days).
    • Ensure Dub.co shortlinks are fetched only once and not updated thereafter.
  2. File Handling:
    • Create a utility function to read/write the JSON file in the format "slug:shortlink".
    • Integrate file read/write operations within the timer and API functions.
  3. Code Refactoring and Optimization:
    • Ensure all functions are modular and reusable.
    • Optimize code for minimal build time and runtime performance impact.

This task list focuses on optimizing the integration processes, managing data fetching frequencies, and ensuring efficient data storage in the specified format.

Metadata

Metadata

Assignees

Labels

choreRoutinary tasks

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions