Actually get the SQL to hash for the query cache

`_get_sql()` doesn’t make sure the the SQL has been generated yet,
`get_sql()` does.

See #12
Allow for network points logs query caching

Use this to cache the `’network’` query.

Includes unit tests.

See #12
Don't indent using spaces

See #12