{"id":22049335,"url":"https://github.com/krish-r/go-caching-with-redis","last_synced_at":"2026-04-09T08:48:36.566Z","repository":{"id":149948154,"uuid":"582881558","full_name":"krish-r/go-caching-with-redis","owner":"krish-r","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-14T08:12:06.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T21:16:01.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krish-r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-28T05:58:34.000Z","updated_at":"2024-12-14T08:12:03.000Z","dependencies_parsed_at":"2024-03-23T10:32:03.766Z","dependency_job_id":null,"html_url":"https://github.com/krish-r/go-caching-with-redis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krish-r%2Fgo-caching-with-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krish-r%2Fgo-caching-with-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krish-r%2Fgo-caching-with-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krish-r%2Fgo-caching-with-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krish-r","download_url":"https://codeload.github.com/krish-r/go-caching-with-redis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245119590,"owners_count":20563763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-30T14:14:55.912Z","updated_at":"2026-04-09T08:48:31.512Z","avatar_url":"https://github.com/krish-r.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-caching-with-redis\n\nAn example app I wrote while exploring caching with redis\n\n## Setup\n\n### Start Docker Containers\n\n-   This will start `redis`, `postgres` and `adminer` containers\n\n    ```sh\n    docker compose up\n    ```\n\n### Download and Load sample dataset\n\n(There could be other better/simpler ways to do this)\n\n-   Download sample dataset (for more datasets check [IMDb Datasets][imdb_datasets])\n\n    ```sh\n    mkdir ./datasets/\n    wget -O ./datasets/title.basics.tsv.gz https://datasets.imdbws.com/title.basics.tsv.gz\n    ```\n\n-   unzip \u0026 get the top 5000 rows (skip the header)\n\n    ```sh\n    gunzip --stdout ./datasets/title.basics.tsv.gz \u003e ./datasets/title.basics.tsv \\\n        \u0026\u0026 head -5001 ./datasets/title.basics.tsv | tail -5000 \u003e ./datasets/title_basics_top5k.tsv\n    ```\n\n    ```sh\n    # Add ./datasets directory to .gitignore\n    echo \"\\ndatasets/*\" \u003e\u003e ./.gitignore\n\n    # **Optional**: remove original files\n    rm -ir ./datasets/title.basics.tsv ./datasets/title.basics.tsv.gz\n    ```\n\n-   Run the `CREATE TABLE` SQL command in `Adminer`. (For default docker container credentials check the .env.template file)\n\n    ```SQL\n    CREATE TABLE IF NOT EXISTS title_basics (\n        tconst VARCHAR(10) PRIMARY KEY UNIQUE NOT NULL,\n        title_type VARCHAR(20) NOT NULL,\n        primary_title VARCHAR(100) NOT NULL,\n        original_title VARCHAR(100) NOT NULL,\n        is_adult VARCHAR(1) NOT NULL,\n        start_year VARCHAR(4),\n        end_year VARCHAR(4),\n        runtime_minutes VARCHAR(5),\n        genres VARCHAR(100)\n    )\n    ```\n\n-   Import the data into the database using Adminer -\u003e Click the table name -\u003e Select data -\u003e Import (as `TSV`)\n\n## Teardown\n\n### Stop Docker Containers\n\n-   This will stop redis, postgres and adminer containers\n\n    ```sh\n    docker compose down\n    ```\n\n## API\n\n-   Get Title information\n\n    ```sh\n    curl -X GET localhost:3000/title/tt0000001 \\\n        -H 'Content-Type: application/json' | jq .\n    ```\n\n[imdb_datasets]: https://www.imdb.com/interfaces/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrish-r%2Fgo-caching-with-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrish-r%2Fgo-caching-with-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrish-r%2Fgo-caching-with-redis/lists"}