{"id":21326243,"url":"https://github.com/masylum/rack-staticifier","last_synced_at":"2025-09-12T03:44:09.627Z","repository":{"id":12797912,"uuid":"15471730","full_name":"masylum/rack-staticifier","owner":"masylum","description":"Staticly cache requests to any Rack application - perfect for creating static sites/blogs/etc!","archived":false,"fork":false,"pushed_at":"2013-12-27T10:30:47.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-23T00:53:06.126Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"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/masylum.png","metadata":{"files":{"readme":"README.rdoc","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":"2013-12-27T10:29:02.000Z","updated_at":"2018-02-02T20:45:06.000Z","dependencies_parsed_at":"2022-09-02T14:31:54.807Z","dependency_job_id":null,"html_url":"https://github.com/masylum/rack-staticifier","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/masylum/rack-staticifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Frack-staticifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Frack-staticifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Frack-staticifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Frack-staticifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masylum","download_url":"https://codeload.github.com/masylum/rack-staticifier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Frack-staticifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274749383,"owners_count":25342116,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"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":[],"created_at":"2024-11-21T21:08:54.209Z","updated_at":"2025-09-12T03:44:09.607Z","avatar_url":"https://github.com/masylum.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Rack::Staticifier\n\nRack::Staticifier is Rack middleware for staticly caching responses.\n\n== Install\n\n  $ gem sources -a http://gems.github.com\n  $ sudo gem install remi-rack-staticifier\n\n== Usage\n\n  require 'rack/staticifier'\n\n  # this will cache ALL responses in a 'cache' directory\n  use Rack::Staticifier\n\n  # this will cache ALL responses in a 'public/my/cached/stuff' directory\n  use Rack::Staticifier, :root =\u003e 'public/my/cached/stuff'\n\n  # this will only cache requests with 'foo' in the URL\n  use Rack::Staticifier do |env, response|\n    env['PATH_INFO'].include?('foo')\n  end\n\n  # this will only cache requests with 'hi' in the response body\n  use Rack::Staticifier do |env, response|\n    # response is a regular Rack response, eg. [200, {}, ['hi there']]\n    body = ''\n    response.last.each {|string| body \u003c\u003c string }\n    body.include?('hi')\n  end\n\n  # this will only cache requests with 'foo' in the URL (incase you don't want to pass a block)\n  use Rack::Staticifier, :cache_if =\u003e lambda { |env, response| env['PATH_INFO'].include?('foo') }\n\n== TODO\n\n* compare to Rack::ResponseCache (in rack-contrib) ... maybe that can replace this, or vice-versa?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasylum%2Frack-staticifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasylum%2Frack-staticifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasylum%2Frack-staticifier/lists"}