mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-25 16:26:51 +08:00
feat: add optional cache busting for image (#12055)
### What problem does this PR solve? Add optional cache busting for image #12003 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -22,6 +22,7 @@ export interface IChunkListResult {
|
||||
setPagination?: (pagination: { page: number; pageSize: number }) => void;
|
||||
available: number | undefined;
|
||||
handleSetAvailable: (available: number | undefined) => void;
|
||||
dataUpdatedAt?: number; // Timestamp when data was last updated - useful for cache busting
|
||||
}
|
||||
|
||||
export const useSelectChunkList = () => {
|
||||
@ -118,7 +119,11 @@ export const useFetchNextChunkList = (
|
||||
const [available, setAvailable] = useState<number | undefined>();
|
||||
const debouncedSearchString = useDebounce(searchString, { wait: 500 });
|
||||
|
||||
const { data, isFetching: loading } = useQuery({
|
||||
const {
|
||||
data,
|
||||
isFetching: loading,
|
||||
dataUpdatedAt,
|
||||
} = useQuery({
|
||||
queryKey: [
|
||||
'fetchChunkList',
|
||||
documentId,
|
||||
@ -183,6 +188,7 @@ export const useFetchNextChunkList = (
|
||||
handleInputChange: onInputChange,
|
||||
available,
|
||||
handleSetAvailable,
|
||||
dataUpdatedAt, // Timestamp when data was last updated - useful for cache busting
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user