nikolalsvk / render_async

render_async lets you include pages asynchronously with AJAX
https://rubygems.org/gems/render_async/
MIT License
1.08k stars 75 forks source link

Improvements and fixes for cached view #16

Closed nightsurge closed 7 years ago

nightsurge commented 7 years ago

Confession: I was unable to test my changes from prior pull request until last night.

I've made a few discoveries that were preventing things from working as intended. This new pull request is fully working for me now in my own project 💯

nikolalsvk commented 7 years ago

I'll try it out

nikolalsvk commented 7 years ago

@nightsurge How would cache expiration work?

nikolalsvk commented 7 years ago

Added info on how can you set cache expiration in the README and released the gem version

https://rubygems.org/gems/render_async/versions/0.3.3

nightsurge commented 7 years ago

Looks like you found it :) it just uses your global policy by default (from application/development/production.rb) or accepts the expires_in parameter in the view like you added to the README

nightsurge commented 7 years ago

Also, I'm the same user as surgevelocityllc (personal vs private accounts). Thanks for making me a contributor!

nikolalsvk commented 7 years ago

Yeah, just passed in expires_in and it worked. This isn't documented explicitly in documentation for cache method.

I've added @nightsurge as contributing account. Cheers! 🍻