# Bootstrap Table Pipelining
Use Plugin: [bootstrap-table-pipeline]
This plugin enables client side data caching for server side requests which will
eliminate the need to issue a new request every page change. This will allow
for a performance balance for a large data set between returning all data at once
(client side paging) and a new server side request (server side paging).
There are two new options:
- usePipeline: enables this feature
- pipelineSize: the size of each cache window
The size of the pipeline must be evenly divisible by the current page size. This is
assured by rounding up to the nearest evenly divisible value. For example, if
the pipeline size is 4990 and the current page size is 25, then pipeline size will
be dynamically set to 5000.
The cache windows are computed based on the pipeline size and the total number of rows
returned by the server side query. For example, with pipeline size 500 and total rows
1300, the cache windows will be:
[{'lower': 0, 'upper': 499}, {'lower': 500, 'upper': 999}, {'lower': 1000, 'upper': 1499}]
Using the limit (i.e. the pipelineSize) and offset parameters, the server side request
**MUST** return only the data in the requested cache window **AND** the total number of rows.
To wit, the server side code must use the offset and limit parameters to prepare the response
data.
On a page change, the new offset is checked if it is within the current cache window. If so,
the requested page data is returned from the cached data set. Otherwise, a new server side
request will be issued for the new cache window.
The current cached data is only invalidated on these events:
- sorting
- searching
- page size change
- page change moves into a new cache window
There are two new events:
- cached-data-hit.bs.table: issued when cached data is used on a page change
- cached-data-reset.bs.table: issued when the cached data is invalidated and new server side request is issued
## Features
* Created with Bootstrap 4
## Usage
```
# assumed import of bootstrap and bootstrap-table assets
<script src="/path/to/bootstrap-table-pipeline.js"></script>
...
<table id="pipeline_table"
class="table table-striped"
data-method='post'
data-use-pipeline="true"
data-pipeline-size="5000"
data-pagination="true"
data-side-pagination="server"
data-page-size="50">
<thead><tr>
<th data-field="type" data-sortable="true">Type</th>
<th data-field="value" data-sortable="true">Value</th>
<th data-field="date" data-sortable="true">Date</th>
</tr></thead>
</table>
```
## Options
### usePipeline
* type: Boolean
* description: Set true to enable pipelining
* default: `false`
## pipelineSize
* type: Integer
* description: Size of each cache window. Must be greater than 0
* default: `1000`
## Events
### onCachedDataHit(cached-data-hit.bs.table)
* Fires when paging was able to use the locally cached data.
### onCachedDataReset(cached-data-reset.bs.table)
* Fires when the locally cached data needed to be reset (i.e. on sorting, searching, page size change or paged out of current cache window)
![avatar](https://profile-avatar.csdnimg.cn/de50ac10e30e41b89db28203f97239be_qq_41701956.jpg!1)
Java程序员-张凯
- 粉丝: 1w+
- 资源: 7654
最新资源
- 基于HTML/CSS/JavaScript的红色学堂网站设计源码
- 基于Vue、Java、JavaScript、CSS、HTML的数据可视化_全国人口情况设计源码
- (源码)基于Arduino的水循环自动化模型系统.zip
- 永磁同步电机径向电磁力密度分析:基于Matlab的二维傅立叶变换程序FFT2D的重磅发布及结果展示,基于Matlab的永磁同步电机径向电磁力密度FFT2D分析程序发布,附图1为自绘结果,图2为Maxw
- (源码)基于Arduino的Solenoid Winder项目.zip
- COMSOL光学模型与合金凝固模拟:随机颗粒散射、相场模拟枝晶生长及锂离子电池枝晶生长分析,基于COMSOL的光学模型:颗粒散射与光镊力模拟,合金凝固与各向异性枝晶生长分析,包括随机形核的锂枝晶模型与
- 深度混合核极限学习机(DHKELM)算法的改进与应用-基于北方苍鹰算法优化的多变量/时间序列预测模型(Matlab程序直接运行版),独家算法DHKELM模型:融合混合核函数与北方苍鹰优化算法的深度回
- 高频阻抗模型:级联H桥SVG的深入解析,级联H桥SVG高频阻抗模型的研究与应用,级联H桥svg高频阻抗模型 ,级联H桥; SVG; 高频阻抗; 模型,高频阻抗模型:级联H桥SVG研究
- TCU变速箱控制器仿真模型设计文档及功能模块概览(包含设计文档详解),乘用车AMTTCU变速箱控制器仿真模型算法设计文档-集成TCU应用层软件与三大数学模型(驱动制动、电机传动及车辆模型),TCU变
- 基于三个主体的能量共享分布式算法ADMM模型matlab+yalmip+cplex仿真平台研究,基于三个主体的能量共享分布式算法ADMM模型Matlab+Yalmip+Cplex仿真研究,分布式算法A
- Open3D C++系列教程 (九)基础控件-Label与Button
- Comsol微环谐振腔的环形波导耦合技术与波束包络及波动光学模块的对比研究,探索Comsol微环谐振腔与环形波导耦合技术:波束包络与波动光学模块的对比研究,Comsol微环谐振腔,环形波导耦和 对比
- 电-气-热综合能源系统深度耦合优化调度模型研究:基于MATLAB的精细化仿真分析,电-气-热综合能源系统耦合优化调度的MATLAB仿真模型:考虑电网、热网与气网交互的细致建模与高效求解,电-气-热综合
- 基于COMSOL的手性超表面光学性能:琼斯矩阵及透射系数计算的深入探索,COMSOL手性超表面琼斯矩阵深度解析:透射系数计算与应用,COMSOL手性超表面 琼斯矩阵,透射系数计算 ,COMSOL;手性
- 基于MATLAB Simulink的电动汽车ABS模型搭建与解析:包含制动力与滑移率计算等详尽过程说明及建模文件,专为初学者打造,基于MATLAB Simulink的电动汽车ABS模型构建:前后轮制动
- Basso大师的LLC谐振控制器设计:Mathcad计算工具与Simplis仿真文件双融合的实践应用PPT两篇详解,Basso大师LLC谐振控制器设计的理论与实践:Mathcad计算工具与Simpli
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)