mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
This reverts commit aa3f5ab3ff412696c715521381eebf176f503197. GitOrigin-RevId: b2be3907439525f3ed49baec0b438ba35ea1663c
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// @ts-ignore
|
||||
import { generateSHA1Hash } from '../../../shared/utils/sha1'
|
||||
import CryptoJSSHA1 from 'crypto-js/sha1'
|
||||
import {
|
||||
createContext,
|
||||
useContext,
|
||||
@@ -94,9 +94,9 @@ export const ReferencesProvider: FC = ({ children }) => {
|
||||
const docId = doc.doc_id
|
||||
const snapshot = doc._doc.snapshot
|
||||
const now = Date.now()
|
||||
const sha1 = generateSHA1Hash(
|
||||
const sha1 = CryptoJSSHA1(
|
||||
'blob ' + snapshot.length + '\x00' + snapshot
|
||||
)
|
||||
).toString()
|
||||
const CACHE_LIFETIME = 6 * 3600 * 1000 // allow reindexing every 6 hours
|
||||
const cacheEntry = existingIndexHash[docId]
|
||||
const isCached =
|
||||
|
||||
Reference in New Issue
Block a user