<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def spec(self):
        '''Actual work spec.

        This is retrieved from the database on first use, and in some
        cases a worker can be mildly more efficient if it avoids using
        this.

        '''
        if self._spec_cache is None:
            self._spec_cache = self.registry.get(
                WORK_SPECS, self.work_spec_name)
        return self._spec_cache