import { DaffRestoreableMetaService } from '@daffodil/seo'
@Injectable()
class DaffRestoreableMetaService implements DaffSeoRestoreableServiceInterface<DaffSeoMetaDefinition, Record<string, DaffSeoMetaDefinition>> {
get upsertCache(): Record<string, DaffSeoMetaDefinition>
get restoreCache(): Record<string, DaffSeoMetaDefinition>
upsert(def: DaffSeoMetaDefinition): void
restore(): void
clear(): void
emptyRestoreCache(): void
}
Record<string, DaffSeoMetaDefinition>
Default | – |
---|---|
Description | Stores the upserted SEO data since the last clear. This represents the SEO data managed by the service. |
Record<string, DaffSeoMetaDefinition>
Default | – |
---|---|
Description | Stores the SEO data present on the current document when it is removed by |
void
Adds the SEO info to the page. Adds the info to the upsert cache.
@param info
Parameter | def: DaffSeoMetaDefinition |
---|---|
Description |
void
Restores the previously cleared SEO info to the page.
void
Removes all of the added SEO info from the page. Only removes what was previously added by this service, that is, what is in the upsert cache.
The SEO data that was removed is then moved to the restore cache.
void
Empties the restore cache. Does not affect upsert cache.