{"id":21466585,"url":"https://github.com/permafrost-dev/laravel-scriptcache","last_synced_at":"2026-04-18T02:31:10.993Z","repository":{"id":57037861,"uuid":"201907358","full_name":"permafrost-dev/laravel-scriptcache","owner":"permafrost-dev","description":"Allows javascript to cache certain information in the laravel cache for a short time.","archived":false,"fork":false,"pushed_at":"2019-08-12T10:19:16.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-23T04:29:37.213Z","etag":null,"topics":["backend","cache","javascript","laravel","laravel-package"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/permafrost-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-12T10:19:04.000Z","updated_at":"2020-07-24T07:37:00.000Z","dependencies_parsed_at":"2022-08-23T20:51:01.089Z","dependency_job_id":null,"html_url":"https://github.com/permafrost-dev/laravel-scriptcache","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/permafrost-dev/laravel-scriptcache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Flaravel-scriptcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Flaravel-scriptcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Flaravel-scriptcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Flaravel-scriptcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/permafrost-dev","download_url":"https://codeload.github.com/permafrost-dev/laravel-scriptcache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Flaravel-scriptcache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["backend","cache","javascript","laravel","laravel-package"],"created_at":"2024-11-23T08:14:38.933Z","updated_at":"2026-04-18T02:31:10.975Z","avatar_url":"https://github.com/permafrost-dev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Laravel ScriptCache\n---\n\nThis package allows javascript to leverage the laravel cache and store small amounts of data for a limited amount of time, usually 60 seconds.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require permafrost-dev/laravel-scriptcache\n```\n\n## Usage\n\n``` javascript\n\n    async function setCachedData(value) {\n        const token = await axios.get('/api/scriptcache?data=' + value);\n        return token;\n    }\n\n    async function getCachedData(token) {\n        const result = (await axios.get('/api/scriptcache/'+token));\n        return result;\n    }\n\n    async function doSomeDataProcessing(dataStr) {\n        const token = (await setCachedData(dataStr)).data;\n        const cacheid = token.cache_id;\n\n        const cachedDataObject = (await getCachedData(cacheid)).data;\n        const cachedData = cachedDataObject.data;\n\n        console.log('original data: ', dataStr);\n        console.log('got cached data: ', cachedData);\n    }\n    \n    //...cache expires after 60 seconds\n```\n\n### Notes\n---\n\nThe cached data is sanitized prior to storage, and the cache key used is tied to the requesting user to avoid access to other items in the cache.\n\n\n### Testing\n\n``` bash\ncomposer test\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermafrost-dev%2Flaravel-scriptcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpermafrost-dev%2Flaravel-scriptcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermafrost-dev%2Flaravel-scriptcache/lists"}