Ah cool. Probably would be clearer if the method name made it clearer what
the argument was. Like `_set_cache_header_length`.


On Mon, Feb 17, 2014 at 4:26 PM, Brandon Dean <notifications@github.com>wrote:

> In controllers/api/api_event_controller.py:
>
> > +        super(ApiEventController, self).__init__(*args, **kw)
> > +        self.event_key = self.request.route_kwargs["event_key"]
> > +        self._cache_expiration = self.LONG_CACHE_EXPIRATION
> > +        self._cache_key = "apiv2_event_controller_{}".format(self.event_key)
> > +        self._cache_version = 2
> > +
> > +    @property
> > +    def _validators(self):
> > +        return [("event_id_validator", self.event_key)]
> > +
> > +    def _track_call(self, event_key):
> > +        api_label = event_key
> > +        self._track_call_defer('event', api_label)
> > +
> > +    def _render(self, event_key):
> > +        self._write_cache_headers(61)
>
> @gregmarra <https://github.com/gregmarra> Sets the cache headers and
> expiration time for them (in seconds, 61 seconds). See
> api_base_controller:91<https://github.com/gregmarra/the-blue-alliance/blob/master/controllers/api/api_base_controller.py#L91>
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/gregmarra/the-blue-alliance/pull/894/files#r9808966>
> .
>