Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 513 Bytes

README.md

File metadata and controls

35 lines (30 loc) · 513 Bytes

Caching

Cache something

begin
  @profile = Geoloqi::Cache.get_fresh(key, ttl) { 
    # This will get cached
  }
rescue
  halt 500
end

Remove something from cache

Geoloqi::Cache.delete key

Pages

# Will search the content folder to page.md
@content = Geoloqi::Pages.find "page"
# Get all pages in content/api
@content = Geoloqi::Pages.all "api"
# Get all pages in content/api
before "/api" do 
  @sidebar ||= Geoloqi::Pages.find "api/sidebar"
end