Giter Club home page Giter Club logo

middleman-cdn's Issues

Possible issue with Cloudflare invalidations

Hey! I was noticing rate limit errors like this one happening a lot. The error only made sense if cloudflare was trying to invalidate everything, based on the error message. That's based on the all parameter, and I took a look at where the method is called. It looks like all is inferred from this method, which is true if you're using the default filter.

From what I can tell, it looks like all is being passed into the invalidate function incorrectly set to true if the filter applies to all files, but within the invalidate function, it's inferred to mean "invalidate all files, not the ones I was given."

Let me know if this makes sense, and if I can provide any more details. I used this fix, and it appears to be working.

CloudFlare cache invalidation is broken

This commit 6ecd16d introduced a compatibility issue with CloudFlare gem. The gem's API has been changed and the correct connection call now looks like this (see the gem's docs):

connection = Cloudflare.connect(key: key, email: email)

The specs passed because the old Cloudflare::connection method is mocked in rspec.

But in reality the middleman-cdn gem is not working at all because of this issue.

Invalidation threshold not respected

As of #9, there's a invalidate_zone_for_many_files option for Cloudflare that means "if I have more than 50 files to invalidate, I'll just invalidate the zone (to avoid hitting the API rate limit)." The option is supposed to default to true, but wouldn't work until I added it explicitly.

Failing deploy: https://travis-ci.org/ashfurrow/blog/builds/119957771#L7481
Succeeding deploy (with explicit option): https://travis-ci.org/ashfurrow/blog/builds/120216017#L5992

Please let me know if I can be off assistance debugging.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.