README.md in macaw_framework-1.0.1 vs README.md in macaw_framework-1.0.2
- old
+ new
@@ -54,20 +54,23 @@
m.get('/cached_data', cache: true) do |context|
# Retrieve data
end
```
+Observation: To activate caching you also have to set it's properties on the application.json file. If you don't, caching strategy will not work.
+See section below for configurations.
+
### Session management: Handle user sessions securely with server-side in-memory storage
```ruby
m.get('/login') do |context|
# Authenticate user
- context[:session][:user_id] = user_id
+ context[:client][:user_id] = user_id
end
m.get('/dashboard') do |context|
# Check if the user is logged in
- if context[:session][:user_id]
+ if context[:client][:user_id]
# Show dashboard
else
# Redirect to login
end
end