symphonycms / remote_datasource

An improved datasource to fetch data from TXT, CSV, XML and JSON sources.
Other
14 stars 9 forks source link

Disable Cache #9

Closed jonmifsud closed 10 years ago

jonmifsud commented 11 years ago

In some instances it would be nice to disable caching. For example if retrieving sensitive information through an API (or if a client instructs so).

Having no cache would ensure data is always fresh, and there are no copies on the server so if ever compromised no confidential data could be retrieved.

Current version always forces cache to be larger then 0; this could be disabled by either setting 0/-1 or else a separate check-box. Willing to implement myself as I need it for a project.

brendo commented 11 years ago

Yeah this is useful. I would just drop the requirement for the cache to be greater than 0 to implement. Adding help text would be nice, something along the lines of 'To disable cache, use 0 minutes`.'

jonmifsud commented 11 years ago

Sounds good to me. I'll try put some time on it tomorrow; shouldn't be complex to implement.

brendo commented 11 years ago

Excellent, thanks!

nitriques commented 11 years ago

I think that adding $this->dsParamCACHE > 0 at line https://github.com/symphonycms/remote_datasource/blob/master/data-sources/datasource.remote.php#L727 did the work for me!!

nitriques commented 10 years ago

Thanks Brendan!