Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Client Site cache #3311


User avatar
0
michaelhilgers created

Angular 2, Asp.core ( .Net4.6)

Hi,

How can I enable client site caching in my project ?

Thanks


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @MichaelHilgers,

    Can you explain it a bit more ?

    Thanks.

  • User Avatar
    0
    michaelhilgers created

    Hi,

    I created a modal 'workModal' that contains list of details => "workDetails". In the workModal I have a foreach loop for the workDetails and inside the foreach loop I have a component to show the informations

    // inside the 'workModal'
     <div class="panel panel-default" *ngFor="let arbeitszeitDetail of workDetails; let index = index;let first = first;let last = last;">
              <createUpdateWorkDetail [userId]="currentUser.id" [arbeitszeitDetail]="arbeitszeitDetail"  
    (arbeitszeitDetailDelete)="deleteArbeitszeitDetail($event);" 
                                       (arbeitszeitDetailChanged)="validateUserInput($event, index);" [index]="index" [first]="first" [last]="last"></createUpdateWorkDetail>
    </div>
    

    In the <createUpdateWorkDetail > Component, are other custom components and these components call the server to get datas from the db and these datas I would like caching for some minutes.

    Is it possible ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    AspNet Zero does not provide anything for this, maybe you can find a solution on the web.

    Thanks.

  • User Avatar
    0
    michaelhilgers created

    Hi,

    I found a solution for client site caching if someone look for it :

    <a class="postlink" href="https://github.com/Jackson88/ng2-cache">https://github.com/Jackson88/ng2-cache</a>

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @MichaelHilgers :)