def get_rate(self, currency, date):
if str(currency) == defaults.INTERNAL_CURRENCY:<EOL><INDENT>return Decimal(<NUM_LIT:1>)<EOL><DEDENT>cached = cache.get(_cache_key(currency, date))<EOL>if cached:<EOL><INDENT>return Decimal(cached)<EOL><DEDENT>else:<EOL><INDENT>return Decimal(self._get_rate(currency, date))<EOL><DEDENT>
Get the exchange rate for ``currency`` against ``_INTERNAL_CURRENCY``

        If implementing your own backend, you should probably override :meth:`_get_rate()`
        rather than this.