kematzy / sinatra-cache

A Sinatra Extension that makes Page and Fragment Caching easy
MIT License
161 stars 21 forks source link

settings.public has been renamed to settings.public_folder #11

Closed gma closed 12 years ago

gma commented 12 years ago

If you use sinatra-cache 0.3.7 with Sinatra 1.3 you get an exception that claims that you're trying to call the private method called public. It seems as though the method has been renamed to public_folder in Sinatra.

I'm currently working around the problem by defining :cache_output_dir myself, like this:

set :cache_output_dir, public_folder

Would you merge a pull request that fixed it if I sent one in? I see there hasn't been a lot of activity on sinatra-cache recently, but I hope it's still alive.

I really do hope it's still alive, as I'm about to remove the page caching support from Nesta CMS and document sinatra-cache as the solution that everybody should be using!

I haven't published the docs yet, but they're here: https://github.com/gma/nestacms.com/blob/9b559eb27bd1d2722640aa799597f86ff3a38bf3/content/pages/docs/deployment/page-caching.mdown

mcfiredrill commented 12 years ago

Are you sure that hasn't been fixed already?

https://github.com/kematzy/sinatra-cache/pull/9

gma commented 12 years ago

Ah, maybe. I didn't check master, just the code in the latest gem. My mistake, sorry...