Skip to content

passthrough mode for :local #1

@ronen

Description

@ronen

It would be nice to have some sort of :passthrough => true option to Defog::Proxy.new(:provider => :local, ...) which would disable caching and proxying and directly serve up the actual files.

Rationale:

The current situation is that :local goes through the same caching mechanism as :AWS. This makes sense in particular for the common (i think) case that :local is being used in development as a standin for :AWS that is used production -- in this way development mimics the production behavior as closely as possible, and supports cache & synchronization manipulation.

But I've got a case where code that uses the Defog API to do some file processing on files stored in :AWS -- and it turns out in production i also want to occasionally do the same processing on files that originate on the client and aren't in AWS. Easy enough to do that by creating a Defog::Proxy using :local and it works fine -- except that it wastes time and space by making a proxy copy of each file and then synchronizing back. Would be nice to be able to skip proxying and act on the files directly.

Notes:

The :passthrough option would only make sense for :local. When enabled, things like :synchronize => false wouldn't make sense. (Ignore them? Warn? Error?) Also, without :passthrough, deleting the proxy file is equivalent to :synchronize => false, but if :passthrough were true deleting the "proxy" would really delete. This makes me think that without :passthrough, deleting a proxy file should instead either raise an error, or delete the remote file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions